/// <summary>
 /// Gets all the local network gateways in a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <LocalNetworkGatewayInner> > ListNextAsync(this ILocalNetworkGatewaysOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the specified local network gateway in a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='localNetworkGatewayName'>
 /// The name of the local network gateway.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <LocalNetworkGatewayInner> GetAsync(this ILocalNetworkGatewaysOperations operations, string resourceGroupName, string localNetworkGatewayName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, localNetworkGatewayName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Creates or updates a local network gateway in the specified resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='localNetworkGatewayName'>
 /// The name of the local network gateway.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the create or update local network gateway
 /// operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <LocalNetworkGateway> BeginCreateOrUpdateAsync(this ILocalNetworkGatewaysOperations operations, string resourceGroupName, string localNetworkGatewayName, LocalNetworkGateway parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, localNetworkGatewayName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Updates a local network gateway tags.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='localNetworkGatewayName'>
 /// The name of the local network gateway.
 /// </param>
 /// <param name='tags'>
 /// Resource tags.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <LocalNetworkGatewayInner> BeginUpdateTagsAsync(this ILocalNetworkGatewaysOperations operations, string resourceGroupName, string localNetworkGatewayName, IDictionary <string, string> tags = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginUpdateTagsWithHttpMessagesAsync(resourceGroupName, localNetworkGatewayName, tags, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#5
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     ApplicationGateways = new ApplicationGatewaysOperations(this);
     ExpressRouteCircuitAuthorizations = new ExpressRouteCircuitAuthorizationsOperations(this);
     ExpressRouteCircuitPeerings = new ExpressRouteCircuitPeeringsOperations(this);
     ExpressRouteCircuits = new ExpressRouteCircuitsOperations(this);
     ExpressRouteServiceProviders = new ExpressRouteServiceProvidersOperations(this);
     LoadBalancers = new LoadBalancersOperations(this);
     NetworkInterfaces = new NetworkInterfacesOperations(this);
     NetworkSecurityGroups = new NetworkSecurityGroupsOperations(this);
     SecurityRules = new SecurityRulesOperations(this);
     NetworkWatchers = new NetworkWatchersOperations(this);
     PacketCaptures = new PacketCapturesOperations(this);
     PublicIPAddresses = new PublicIPAddressesOperations(this);
     RouteFilters = new RouteFiltersOperations(this);
     RouteFilterRules = new RouteFilterRulesOperations(this);
     RouteTables = new RouteTablesOperations(this);
     Routes = new RoutesOperations(this);
     BgpServiceCommunities = new BgpServiceCommunitiesOperations(this);
     Usages = new UsagesOperations(this);
     VirtualNetworks = new VirtualNetworksOperations(this);
     Subnets = new SubnetsOperations(this);
     VirtualNetworkPeerings = new VirtualNetworkPeeringsOperations(this);
     VirtualNetworkGateways = new VirtualNetworkGatewaysOperations(this);
     VirtualNetworkGatewayConnections = new VirtualNetworkGatewayConnectionsOperations(this);
     LocalNetworkGateways = new LocalNetworkGatewaysOperations(this);
     BaseUri = new System.Uri("https://management.azure.com");
     AcceptLanguage = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId = true;
     SerializationSettings = new JsonSerializerSettings
     {
         Formatting = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver = new ReadOnlyJsonContractResolver(),
         Converters = new List<JsonConverter>
             {
                 new Iso8601TimeSpanConverter()
             }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver = new ReadOnlyJsonContractResolver(),
         Converters = new List<JsonConverter>
             {
                 new Iso8601TimeSpanConverter()
             }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
 /// <summary>
 /// Deletes the specified local network gateway.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='localNetworkGatewayName'>
 /// The name of the local network gateway.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this ILocalNetworkGatewaysOperations operations, string resourceGroupName, string localNetworkGatewayName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, localNetworkGatewayName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Gets the specified local network gateway in a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='localNetworkGatewayName'>
 /// The name of the local network gateway.
 /// </param>
 public static LocalNetworkGateway Get(this ILocalNetworkGatewaysOperations operations, string resourceGroupName, string localNetworkGatewayName)
 {
     return(operations.GetAsync(resourceGroupName, localNetworkGatewayName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Creates or updates a local network gateway in the specified resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='localNetworkGatewayName'>
 /// The name of the local network gateway.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the create or update local network gateway
 /// operation.
 /// </param>
 public static LocalNetworkGateway CreateOrUpdate(this ILocalNetworkGatewaysOperations operations, string resourceGroupName, string localNetworkGatewayName, LocalNetworkGateway parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, localNetworkGatewayName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all the local network gateways in a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <LocalNetworkGateway> ListNext(this ILocalNetworkGatewaysOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes the specified local network gateway.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='localNetworkGatewayName'>
 /// The name of the local network gateway.
 /// </param>
 public static void BeginDelete(this ILocalNetworkGatewaysOperations operations, string resourceGroupName, string localNetworkGatewayName)
 {
     operations.BeginDeleteAsync(resourceGroupName, localNetworkGatewayName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Gets all the local network gateways in a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 public static IPage <LocalNetworkGateway> List(this ILocalNetworkGatewaysOperations operations, string resourceGroupName)
 {
     return(operations.ListAsync(resourceGroupName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Updates a local network gateway tags.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='localNetworkGatewayName'>
 /// The name of the local network gateway.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to update local network gateway tags.
 /// </param>
 public static LocalNetworkGateway BeginUpdateTags(this ILocalNetworkGatewaysOperations operations, string resourceGroupName, string localNetworkGatewayName, TagsObject parameters)
 {
     return(operations.BeginUpdateTagsAsync(resourceGroupName, localNetworkGatewayName, parameters).GetAwaiter().GetResult());
 }
示例#13
0
 /// <summary>
 /// The Put LocalNetworkGateway operation creates/updates a local network
 /// gateway in the specified resource group through Network resource provider.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='localNetworkGatewayName'>
 /// The name of the local network gateway.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Begin Create or update Local Network Gateway
 /// operation through Network resource provider.
 /// </param>
 public static LocalNetworkGateway BeginCreateOrUpdate(this ILocalNetworkGatewaysOperations operations, string resourceGroupName, string localNetworkGatewayName, LocalNetworkGateway parameters)
 {
     return(Task.Factory.StartNew(s => ((ILocalNetworkGatewaysOperations)s).BeginCreateOrUpdateAsync(resourceGroupName, localNetworkGatewayName, parameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#14
0
 /// <summary>
 /// The List LocalNetworkGateways operation retrieves all the local network
 /// gateways stored.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <LocalNetworkGateway> ListNext(this ILocalNetworkGatewaysOperations operations, string nextPageLink)
 {
     return(Task.Factory.StartNew(s => ((ILocalNetworkGatewaysOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#15
0
 /// <summary>
 /// The Delete LocalNetworkGateway operation deletes the specified local
 /// network Gateway through Network resource provider.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='localNetworkGatewayName'>
 /// The name of the local network gateway.
 /// </param>
 public static void BeginDelete(this ILocalNetworkGatewaysOperations operations, string resourceGroupName, string localNetworkGatewayName)
 {
     Task.Factory.StartNew(s => ((ILocalNetworkGatewaysOperations)s).BeginDeleteAsync(resourceGroupName, localNetworkGatewayName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
示例#16
0
        /// <summary>
        /// The List LocalNetworkGateways opertion retrieves all the local network
        /// gateways stored.
        /// </summary>
        /// <param name='operations'>
        /// The operations group for this extension method.
        /// </param>
        /// <param name='resourceGroupName'>
        /// The name of the resource group.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        public static async Task <IPage <LocalNetworkGateway> > ListAsync(this ILocalNetworkGatewaysOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
        {
            AzureOperationResponse <IPage <LocalNetworkGateway> > result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }