Microsoft.Azure.Commands.Network.AzureApplicationGatewayUrlPathMapConfigBase.NewObject C# (CSharp) Method

NewObject() public method

public NewObject ( ) : PSApplicationGatewayUrlPathMap
return Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayUrlPathMap
        public PSApplicationGatewayUrlPathMap NewObject()
        {
            var urlPathMap = new PSApplicationGatewayUrlPathMap();

            urlPathMap.Name = this.Name;
            urlPathMap.PathRules = this.PathRules;

            if (!string.IsNullOrEmpty(this.DefaultBackendAddressPoolId))
            {
                urlPathMap.DefaultBackendAddressPool = new PSResourceId();
                urlPathMap.DefaultBackendAddressPool.Id = this.DefaultBackendAddressPoolId;
            }

            if (!string.IsNullOrEmpty(this.DefaultBackendHttpSettingsId))
            {
                urlPathMap.DefaultBackendHttpSettings = new PSResourceId();
                urlPathMap.DefaultBackendHttpSettings.Id = this.DefaultBackendHttpSettingsId;
            }

            urlPathMap.Id = ApplicationGatewayChildResourceHelper.GetResourceNotSetId(
                this.NetworkClient.NetworkManagementClient.SubscriptionId,
                Microsoft.Azure.Commands.Network.Properties.Resources.ApplicationGatewayUrlPathMapName,
                this.Name);

            return urlPathMap;
        }
    }
AzureApplicationGatewayUrlPathMapConfigBase