/// <summary>
 /// Gets a scoped resource in a private link scope.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='scopeName'>
 /// The name of the Azure Monitor PrivateLinkScope resource.
 /// </param>
 /// <param name='name'>
 /// The name of the scoped resource object.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ScopedResource> GetAsync(this IPrivateLinkScopedResourcesOperations operations, string resourceGroupName, string scopeName, string name, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, scopeName, name, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Approve or reject a private endpoint connection with a given name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='scopeName'>
 /// The name of the Azure Monitor PrivateLinkScope resource.
 /// </param>
 /// <param name='name'>
 /// The name of the scoped resource object.
 /// </param>
 /// <param name='linkedResourceId'>
 /// The resource id of the scoped Azure monitor resource.
 /// </param>
 public static ScopedResource CreateOrUpdate(this IPrivateLinkScopedResourcesOperations operations, string resourceGroupName, string scopeName, string name, string linkedResourceId = default(string))
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, scopeName, name, linkedResourceId).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all private endpoint connections on a private link scope.
 /// </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 <ScopedResource> > ListByPrivateLinkScopeNextAsync(this IPrivateLinkScopedResourcesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByPrivateLinkScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a scoped resource in a private link scope.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='scopeName'>
 /// The name of the Azure Monitor PrivateLinkScope resource.
 /// </param>
 /// <param name='name'>
 /// The name of the scoped resource object.
 /// </param>
 public static ScopedResource Get(this IPrivateLinkScopedResourcesOperations operations, string resourceGroupName, string scopeName, string name)
 {
     return(operations.GetAsync(resourceGroupName, scopeName, name).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all private endpoint connections on a private link scope.
 /// </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 <ScopedResource> ListByPrivateLinkScopeNext(this IPrivateLinkScopedResourcesOperations operations, string nextPageLink)
 {
     return(operations.ListByPrivateLinkScopeNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes a private endpoint connection with a given name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='scopeName'>
 /// The name of the Azure Monitor PrivateLinkScope resource.
 /// </param>
 /// <param name='name'>
 /// The name of the scoped resource object.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IPrivateLinkScopedResourcesOperations operations, string resourceGroupName, string scopeName, string name, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, scopeName, name, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Deletes a private endpoint connection with a given name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='scopeName'>
 /// The name of the Azure Monitor PrivateLinkScope resource.
 /// </param>
 /// <param name='name'>
 /// The name of the scoped resource object.
 /// </param>
 public static void BeginDelete(this IPrivateLinkScopedResourcesOperations operations, string resourceGroupName, string scopeName, string name)
 {
     operations.BeginDeleteAsync(resourceGroupName, scopeName, name).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Gets all private endpoint connections on a private link scope.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='scopeName'>
 /// The name of the Azure Monitor PrivateLinkScope resource.
 /// </param>
 public static IPage <ScopedResource> ListByPrivateLinkScope(this IPrivateLinkScopedResourcesOperations operations, string resourceGroupName, string scopeName)
 {
     return(operations.ListByPrivateLinkScopeAsync(resourceGroupName, scopeName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     AutoscaleSettings          = new AutoscaleSettingsOperations(this);
     Operations                 = new Operations(this);
     AlertRuleIncidents         = new AlertRuleIncidentsOperations(this);
     AlertRules                 = new AlertRulesOperations(this);
     LogProfiles                = new LogProfilesOperations(this);
     DiagnosticSettings         = new DiagnosticSettingsOperations(this);
     DiagnosticSettingsCategory = new DiagnosticSettingsCategoryOperations(this);
     ActionGroups               = new ActionGroupsOperations(this);
     ActivityLogAlerts          = new ActivityLogAlertsOperations(this);
     ActivityLogs               = new ActivityLogsOperations(this);
     EventCategories            = new EventCategoriesOperations(this);
     TenantActivityLogs         = new TenantActivityLogsOperations(this);
     MetricDefinitions          = new MetricDefinitionsOperations(this);
     Metrics                          = new MetricsOperations(this);
     MetricBaseline                   = new MetricBaselineOperations(this);
     Baselines                        = new BaselinesOperations(this);
     MetricAlerts                     = new MetricAlertsOperations(this);
     MetricAlertsStatus               = new MetricAlertsStatusOperations(this);
     ScheduledQueryRules              = new ScheduledQueryRulesOperations(this);
     MetricNamespaces                 = new MetricNamespacesOperations(this);
     VMInsights                       = new VMInsightsOperations(this);
     PrivateLinkScopes                = new PrivateLinkScopesOperations(this);
     PrivateLinkScopeOperationStatus  = new PrivateLinkScopeOperationStatusOperations(this);
     PrivateLinkResources             = new PrivateLinkResourcesOperations(this);
     PrivateEndpointConnections       = new PrivateEndpointConnectionsOperations(this);
     PrivateLinkScopedResources       = new PrivateLinkScopedResourcesOperations(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()
         }
     };
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <RuleDataSource>("odata.type"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <RuleDataSource>("odata.type"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <RuleCondition>("odata.type"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <RuleCondition>("odata.type"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <RuleAction>("odata.type"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <RuleAction>("odata.type"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <MetricAlertCriteria>("odata.type"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <MetricAlertCriteria>("odata.type"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <MultiMetricCriteria>("criterionType"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <MultiMetricCriteria>("criterionType"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <Action>("odata.type"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <Action>("odata.type"));
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }