///GENMHASH:6D1A2C780BE8CE95C7C882306AEA5514:382B8CA255C0D129D8C065E6C9801354 public async Task <Microsoft.Azure.Management.ContainerRegistry.Fluent.IWebhook> GetAsync(string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default(CancellationToken)) { WebhookImpl webhookImpl; var webhookInner = await this.containerRegistryManager.Inner.Webhooks.GetAsync(resourceGroupName, registryName, webhookName, cancellationToken); if (containerRegistry != null) { webhookImpl = new WebhookImpl(webhookName, this.containerRegistry, webhookInner, this.containerRegistryManager); } else { webhookImpl = new WebhookImpl(resourceGroupName, registryName, webhookName, webhookInner, this.containerRegistryManager); } return(await webhookImpl.SetCallbackConfigAsync(cancellationToken)); }
private async Task <IWebhook> WrapModelAsync(Models.WebhookInner webhookInner, CancellationToken cancellationToken) { WebhookImpl webhookImpl; if (containerRegistry != null) { webhookImpl = new WebhookImpl(webhookInner.Name, this.containerRegistry, webhookInner, this.containerRegistryManager); } else { string resourceGroupName = ResourceUtils.GroupFromResourceId(webhookInner.Id); string registryName = ResourceUtils.NameFromResourceId(ResourceUtils.ParentResourcePathFromResourceId(webhookInner.Id)); webhookImpl = new WebhookImpl(resourceGroupName, registryName, webhookInner.Name, webhookInner, this.containerRegistryManager); } return(await webhookImpl.SetCallbackConfigAsync(cancellationToken)); }