public static Profile CreateOrUpdateProfileWithMultiValue(
            TrafficManagerManagementClient trafficManagerClient,
            string resourceGroupName,
            string profileName,
            long?maxReturn = 2)
        {
            Profile expectedProfile = CreateOrUpdateDefaultEmptyProfile(trafficManagerClient, resourceGroupName, profileName, "MultiValue", "Disabled", maxReturn);

            expectedProfile.Endpoints = new List <Endpoint>();
            for (int ndx = 0; ndx < 5; ndx++)
            {
                Endpoint endpoint = TrafficManagerHelper.GenerateDefaultEndpoint(
                    $"My external endpoint {ndx}",
                    $"1.2.3.{ndx}");

                EndpointPropertiesSubnetsItem range  = new EndpointPropertiesSubnetsItem($"1.2.{ndx}.0", $"1.2.{ndx}.250");
                EndpointPropertiesSubnetsItem subnet = new EndpointPropertiesSubnetsItem($"3.4.{ndx}.0", null, 24);
                endpoint.Subnets = new List <EndpointPropertiesSubnetsItem> {
                    range, subnet
                };

                trafficManagerClient.Endpoints.CreateOrUpdate(
                    resourceGroupName,
                    profileName,
                    "ExternalEndpoints",
                    endpoint.Name,
                    endpoint);

                expectedProfile.Endpoints.Add(endpoint);
            }

            return(expectedProfile);
        }
 public static TrafficManagerIpAddressRange FromSDKSubnetMapping(EndpointPropertiesSubnetsItem endpointPropertiesSubnetsItem)
 {
     return(new TrafficManagerIpAddressRange
     {
         First = endpointPropertiesSubnetsItem.First,
         Last = endpointPropertiesSubnetsItem.Last,
         Scope = endpointPropertiesSubnetsItem.Scope,
     });
 }