/// <summary>
 /// Gets the list of Node types of the specified managed cluster.
 /// </summary>
 /// <remarks>
 /// Gets all Node types of the specified managed cluster.
 /// </remarks>
 /// <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 <NodeType> > ListByManagedClustersNextAsync(this INodeTypesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByManagedClustersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Updates the configuration of a node type of a given managed cluster.
 /// </summary>
 /// <remarks>
 /// Update the configuration of a node type of a given managed cluster.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the cluster resource.
 /// </param>
 /// <param name='nodeTypeName'>
 /// The name of the node type.
 /// </param>
 /// <param name='parameters'>
 /// The parameters to update the node type configuration.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <NodeType> BeginUpdateAsync(this INodeTypesOperations operations, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeUpdateParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, clusterName, nodeTypeName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the list of Node types of the specified managed cluster.
 /// </summary>
 /// <remarks>
 /// Gets all Node types of the specified managed cluster.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the cluster resource.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <NodeType> > ListByManagedClustersAsync(this INodeTypesOperations operations, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByManagedClustersWithHttpMessagesAsync(resourceGroupName, clusterName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Update the tags of a node type resource of a given managed cluster.
 /// </summary>
 /// <remarks>
 /// Update the configuration of a node type of a given managed cluster, only
 /// updating tags.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the cluster resource.
 /// </param>
 /// <param name='nodeTypeName'>
 /// The name of the node type.
 /// </param>
 /// <param name='tags'>
 /// Node type update parameters
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <NodeType> UpdateAsync(this INodeTypesOperations operations, string resourceGroupName, string clusterName, string nodeTypeName, IDictionary <string, string> tags = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, clusterName, nodeTypeName, tags, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     ApplicationTypes        = new ApplicationTypesOperations(this);
     ApplicationTypeVersions = new ApplicationTypeVersionsOperations(this);
     Applications            = new ApplicationsOperations(this);
     Services              = new ServicesOperations(this);
     ManagedClusters       = new ManagedClustersOperations(this);
     ManagedClusterVersion = new ManagedClusterVersionOperations(this);
     Operations            = new Operations(this);
     NodeTypes             = new NodeTypesOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2021-05-01";
     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()
         }
     };
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <Partition>("partitionScheme"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <Partition>("partitionScheme"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ScalingMechanism>("kind"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ScalingMechanism>("kind"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ScalingTrigger>("kind"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ScalingTrigger>("kind"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ServicePlacementPolicy>("type"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ServicePlacementPolicy>("type"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ServiceResourceProperties>("serviceKind"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ServiceResourceProperties>("serviceKind"));
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
 /// <summary>
 /// Restarts one or more nodes on the node type.
 /// </summary>
 /// <remarks>
 /// Restarts one or more nodes on the node type. It will disable the fabric
 /// nodes, trigger a restart on the VMs and activate the nodes back again.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the cluster resource.
 /// </param>
 /// <param name='nodeTypeName'>
 /// The name of the node type.
 /// </param>
 /// <param name='parameters'>
 /// parameters for restart action.
 /// </param>
 public static void Restart(this INodeTypesOperations operations, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionParameters parameters)
 {
     operations.RestartAsync(resourceGroupName, clusterName, nodeTypeName, parameters).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Gets the list of Node types of the specified managed cluster.
 /// </summary>
 /// <remarks>
 /// Gets all Node types of the specified managed cluster.
 /// </remarks>
 /// <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 <NodeType> ListByManagedClustersNext(this INodeTypesOperations operations, string nextPageLink)
 {
     return(operations.ListByManagedClustersNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes a Service Fabric node type.
 /// </summary>
 /// <remarks>
 /// Delete a Service Fabric node type of a given managed cluster.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the cluster resource.
 /// </param>
 /// <param name='nodeTypeName'>
 /// The name of the node type.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this INodeTypesOperations operations, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, clusterName, nodeTypeName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Deletes a Service Fabric node type.
 /// </summary>
 /// <remarks>
 /// Delete a Service Fabric node type of a given managed cluster.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the cluster resource.
 /// </param>
 /// <param name='nodeTypeName'>
 /// The name of the node type.
 /// </param>
 public static void BeginDelete(this INodeTypesOperations operations, string resourceGroupName, string clusterName, string nodeTypeName)
 {
     operations.BeginDeleteAsync(resourceGroupName, clusterName, nodeTypeName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Updates the configuration of a node type of a given managed cluster.
 /// </summary>
 /// <remarks>
 /// Update the configuration of a node type of a given managed cluster.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the cluster resource.
 /// </param>
 /// <param name='nodeTypeName'>
 /// The name of the node type.
 /// </param>
 /// <param name='parameters'>
 /// The parameters to update the node type configuration.
 /// </param>
 public static NodeType BeginUpdate(this INodeTypesOperations operations, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeUpdateParameters parameters)
 {
     return(operations.BeginUpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the list of Node types of the specified managed cluster.
 /// </summary>
 /// <remarks>
 /// Gets all Node types of the specified managed cluster.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the cluster resource.
 /// </param>
 public static IPage <NodeType> ListByManagedClusters(this INodeTypesOperations operations, string resourceGroupName, string clusterName)
 {
     return(operations.ListByManagedClustersAsync(resourceGroupName, clusterName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets a Service Fabric node type.
 /// </summary>
 /// <remarks>
 /// Get a Service Fabric node type of a given managed cluster.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the cluster resource.
 /// </param>
 /// <param name='nodeTypeName'>
 /// The name of the node type.
 /// </param>
 public static NodeType Get(this INodeTypesOperations operations, string resourceGroupName, string clusterName, string nodeTypeName)
 {
     return(operations.GetAsync(resourceGroupName, clusterName, nodeTypeName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Restarts one or more nodes on the node type.
 /// </summary>
 /// <remarks>
 /// Restarts one or more nodes on the node type. It will disable the fabric
 /// nodes, trigger a restart on the VMs and activate the nodes back again.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the cluster resource.
 /// </param>
 /// <param name='nodeTypeName'>
 /// The name of the node type.
 /// </param>
 /// <param name='parameters'>
 /// parameters for restart action.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task RestartAsync(this INodeTypesOperations operations, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.RestartWithHttpMessagesAsync(resourceGroupName, clusterName, nodeTypeName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Update the tags of a node type resource of a given managed cluster.
 /// </summary>
 /// <remarks>
 /// Update the configuration of a node type of a given managed cluster, only
 /// updating tags.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the cluster resource.
 /// </param>
 /// <param name='nodeTypeName'>
 /// The name of the node type.
 /// </param>
 /// <param name='tags'>
 /// Node type update parameters
 /// </param>
 public static NodeType Update(this INodeTypesOperations operations, string resourceGroupName, string clusterName, string nodeTypeName, IDictionary <string, string> tags = default(IDictionary <string, string>))
 {
     return(operations.UpdateAsync(resourceGroupName, clusterName, nodeTypeName, tags).GetAwaiter().GetResult());
 }