/// <summary>
 /// Updates a webhook with the specified parameters.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group to which the container registry belongs.
 /// </param>
 /// <param name='registryName'>
 /// The name of the container registry.
 /// </param>
 /// <param name='webhookName'>
 /// The name of the webhook.
 /// </param>
 /// <param name='webhookUpdateParameters'>
 /// The parameters for updating a webhook.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async System.Threading.Tasks.Task <Webhook> BeginUpdateAsync(this IWebhooksOperations operations, string resourceGroupName, string registryName, string webhookName, WebhookUpdateParameters webhookUpdateParameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists all the webhooks for the specified container registry.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group to which the container registry belongs.
 /// </param>
 /// <param name='registryName'>
 /// The name of the container registry.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async System.Threading.Tasks.Task <IPage <Webhook> > ListAsync(this IWebhooksOperations operations, string resourceGroupName, string registryName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, registryName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #3
0
 /// <summary>
 /// Gets the properties of the specified webhook.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group to which the container registry belongs.
 /// </param>
 /// <param name='registryName'>
 /// The name of the container registry.
 /// </param>
 /// <param name='webhookName'>
 /// The name of the webhook.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <WebhookInner> GetAsync(this IWebhooksOperations operations, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, registryName, webhookName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #4
0
 /// <summary>
 /// Lists recent events for the specified webhook.
 /// </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 <EventModel> > ListEventsNextAsync(this IWebhooksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListEventsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Registries     = new RegistriesOperations(this);
     Operations     = new Operations(this);
     Replications   = new ReplicationsOperations(this);
     Webhooks       = new WebhooksOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2017-10-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()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
 /// <summary>
 /// Gets the properties of the specified webhook.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group to which the container registry belongs.
 /// </param>
 /// <param name='registryName'>
 /// The name of the container registry.
 /// </param>
 /// <param name='webhookName'>
 /// The name of the webhook.
 /// </param>
 public static Webhook Get(this IWebhooksOperations operations, string resourceGroupName, string registryName, string webhookName)
 {
     return(operations.GetAsync(resourceGroupName, registryName, webhookName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists recent events for the specified webhook.
 /// </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 <EventModel> ListEventsNext(this IWebhooksOperations operations, string nextPageLink)
 {
     return(operations.ListEventsNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Updates a webhook with the specified parameters.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group to which the container registry belongs.
 /// </param>
 /// <param name='registryName'>
 /// The name of the container registry.
 /// </param>
 /// <param name='webhookName'>
 /// The name of the webhook.
 /// </param>
 /// <param name='webhookUpdateParameters'>
 /// The parameters for updating a webhook.
 /// </param>
 public static Webhook BeginUpdate(this IWebhooksOperations operations, string resourceGroupName, string registryName, string webhookName, WebhookUpdateParameters webhookUpdateParameters)
 {
     return(operations.BeginUpdateAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes a webhook from a container registry.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group to which the container registry belongs.
 /// </param>
 /// <param name='registryName'>
 /// The name of the container registry.
 /// </param>
 /// <param name='webhookName'>
 /// The name of the webhook.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async System.Threading.Tasks.Task BeginDeleteAsync(this IWebhooksOperations operations, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, registryName, webhookName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Deletes a webhook from a container registry.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group to which the container registry belongs.
 /// </param>
 /// <param name='registryName'>
 /// The name of the container registry.
 /// </param>
 /// <param name='webhookName'>
 /// The name of the webhook.
 /// </param>
 public static void BeginDelete(this IWebhooksOperations operations, string resourceGroupName, string registryName, string webhookName)
 {
     operations.BeginDeleteAsync(resourceGroupName, registryName, webhookName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Lists all the webhooks for the specified container registry.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group to which the container registry belongs.
 /// </param>
 /// <param name='registryName'>
 /// The name of the container registry.
 /// </param>
 public static IPage <Webhook> List(this IWebhooksOperations operations, string resourceGroupName, string registryName)
 {
     return(operations.ListAsync(resourceGroupName, registryName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists recent events for the specified webhook.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group to which the container registry belongs.
 /// </param>
 /// <param name='registryName'>
 /// The name of the container registry.
 /// </param>
 /// <param name='webhookName'>
 /// The name of the webhook.
 /// </param>
 public static IPage <EventModel> ListEvents(this IWebhooksOperations operations, string resourceGroupName, string registryName, string webhookName)
 {
     return(operations.ListEventsAsync(resourceGroupName, registryName, webhookName).GetAwaiter().GetResult());
 }
Example #13
0
 /// <summary>
 /// Lists all the webhooks for the specified container registry.
 /// </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 System.Threading.Tasks.Task <IPage <WebhookInner> > ListNextAsync(this IWebhooksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }