diff --git a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/ImportImageParameters.java b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/ImportImageParameters.java new file mode 100644 index 00000000000..1ab3776b504 --- /dev/null +++ b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/ImportImageParameters.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerregistry; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ImportImageParameters model. + */ +public class ImportImageParameters { + /** + * The source of the image. + */ + @JsonProperty(value = "source", required = true) + private ImportSource source; + + /** + * List of strings of the form repo[:tag]. When tag is omitted the source + * will be used (or 'latest' if source tag is also omitted). + */ + @JsonProperty(value = "targetTags") + private List targetTags; + + /** + * List of strings of repository names to do a manifest only copy. No tag + * will be created. + */ + @JsonProperty(value = "untaggedTargetRepositories") + private List untaggedTargetRepositories; + + /** + * When Force, any existing target tags will be overwritten. When NoForce, + * any existing target tags will fail the operation before any copying + * begins. Possible values include: 'NoForce', 'Force'. + */ + @JsonProperty(value = "mode") + private ImportMode mode; + + /** + * Get the source value. + * + * @return the source value + */ + public ImportSource source() { + return this.source; + } + + /** + * Set the source value. + * + * @param source the source value to set + * @return the ImportImageParameters object itself. + */ + public ImportImageParameters withSource(ImportSource source) { + this.source = source; + return this; + } + + /** + * Get the targetTags value. + * + * @return the targetTags value + */ + public List targetTags() { + return this.targetTags; + } + + /** + * Set the targetTags value. + * + * @param targetTags the targetTags value to set + * @return the ImportImageParameters object itself. + */ + public ImportImageParameters withTargetTags(List targetTags) { + this.targetTags = targetTags; + return this; + } + + /** + * Get the untaggedTargetRepositories value. + * + * @return the untaggedTargetRepositories value + */ + public List untaggedTargetRepositories() { + return this.untaggedTargetRepositories; + } + + /** + * Set the untaggedTargetRepositories value. + * + * @param untaggedTargetRepositories the untaggedTargetRepositories value to set + * @return the ImportImageParameters object itself. + */ + public ImportImageParameters withUntaggedTargetRepositories(List untaggedTargetRepositories) { + this.untaggedTargetRepositories = untaggedTargetRepositories; + return this; + } + + /** + * Get the mode value. + * + * @return the mode value + */ + public ImportMode mode() { + return this.mode; + } + + /** + * Set the mode value. + * + * @param mode the mode value to set + * @return the ImportImageParameters object itself. + */ + public ImportImageParameters withMode(ImportMode mode) { + this.mode = mode; + return this; + } + +} diff --git a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/OperationMetricSpecificationDefinition.java b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/OperationMetricSpecificationDefinition.java new file mode 100644 index 00000000000..2d36c48b7c6 --- /dev/null +++ b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/OperationMetricSpecificationDefinition.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerregistry; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The definition of Azure Monitoring metric. + */ +public class OperationMetricSpecificationDefinition { + /** + * Metric name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Metric display name. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Metric description. + */ + @JsonProperty(value = "displayDescription") + private String displayDescription; + + /** + * Metric unit. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * Metric aggregation type. + */ + @JsonProperty(value = "aggregationType") + private String aggregationType; + + /** + * Internal metric name. + */ + @JsonProperty(value = "internalMetricName") + private String internalMetricName; + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the OperationMetricSpecificationDefinition object itself. + */ + public OperationMetricSpecificationDefinition withName(String name) { + this.name = name; + return this; + } + + /** + * Get the displayName value. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName value. + * + * @param displayName the displayName value to set + * @return the OperationMetricSpecificationDefinition object itself. + */ + public OperationMetricSpecificationDefinition withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the displayDescription value. + * + * @return the displayDescription value + */ + public String displayDescription() { + return this.displayDescription; + } + + /** + * Set the displayDescription value. + * + * @param displayDescription the displayDescription value to set + * @return the OperationMetricSpecificationDefinition object itself. + */ + public OperationMetricSpecificationDefinition withDisplayDescription(String displayDescription) { + this.displayDescription = displayDescription; + return this; + } + + /** + * Get the unit value. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set the unit value. + * + * @param unit the unit value to set + * @return the OperationMetricSpecificationDefinition object itself. + */ + public OperationMetricSpecificationDefinition withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get the aggregationType value. + * + * @return the aggregationType value + */ + public String aggregationType() { + return this.aggregationType; + } + + /** + * Set the aggregationType value. + * + * @param aggregationType the aggregationType value to set + * @return the OperationMetricSpecificationDefinition object itself. + */ + public OperationMetricSpecificationDefinition withAggregationType(String aggregationType) { + this.aggregationType = aggregationType; + return this; + } + + /** + * Get the internalMetricName value. + * + * @return the internalMetricName value + */ + public String internalMetricName() { + return this.internalMetricName; + } + + /** + * Set the internalMetricName value. + * + * @param internalMetricName the internalMetricName value to set + * @return the OperationMetricSpecificationDefinition object itself. + */ + public OperationMetricSpecificationDefinition withInternalMetricName(String internalMetricName) { + this.internalMetricName = internalMetricName; + return this; + } + +} diff --git a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/OperationServiceSpecificationDefinition.java b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/OperationServiceSpecificationDefinition.java new file mode 100644 index 00000000000..629d9c943aa --- /dev/null +++ b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/OperationServiceSpecificationDefinition.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerregistry; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The definition of Azure Monitoring metrics list. + */ +public class OperationServiceSpecificationDefinition { + /** + * A list of Azure Monitoring metrics definition. + */ + @JsonProperty(value = "metricSpecifications") + private List metricSpecifications; + + /** + * Get the metricSpecifications value. + * + * @return the metricSpecifications value + */ + public List metricSpecifications() { + return this.metricSpecifications; + } + + /** + * Set the metricSpecifications value. + * + * @param metricSpecifications the metricSpecifications value to set + * @return the OperationServiceSpecificationDefinition object itself. + */ + public OperationServiceSpecificationDefinition withMetricSpecifications(List metricSpecifications) { + this.metricSpecifications = metricSpecifications; + return this; + } + +} diff --git a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/PolicyStatus.java b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/PolicyStatus.java new file mode 100644 index 00000000000..12cf0c3301a --- /dev/null +++ b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/PolicyStatus.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerregistry; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PolicyStatus. + */ +public final class PolicyStatus extends ExpandableStringEnum { + /** Static value enabled for PolicyStatus. */ + public static final PolicyStatus ENABLED = fromString("enabled"); + + /** Static value disabled for PolicyStatus. */ + public static final PolicyStatus DISABLED = fromString("disabled"); + + /** + * Creates or finds a PolicyStatus from its string representation. + * @param name a name to look for + * @return the corresponding PolicyStatus + */ + @JsonCreator + public static PolicyStatus fromString(String name) { + return fromString(name, PolicyStatus.class); + } + + /** + * @return known PolicyStatus values + */ + public static Collection values() { + return values(PolicyStatus.class); + } +} diff --git a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/QuarantinePolicy.java b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/QuarantinePolicy.java new file mode 100644 index 00000000000..7643b63e8fd --- /dev/null +++ b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/QuarantinePolicy.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerregistry; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An object that represents quarantine policy for a container registry. + */ +public class QuarantinePolicy { + /** + * The value that indicates whether the policy is enabled or not. Possible + * values include: 'enabled', 'disabled'. + */ + @JsonProperty(value = "status") + private PolicyStatus status; + + /** + * Get the status value. + * + * @return the status value + */ + public PolicyStatus status() { + return this.status; + } + + /** + * Set the status value. + * + * @param status the status value to set + * @return the QuarantinePolicy object itself. + */ + public QuarantinePolicy withStatus(PolicyStatus status) { + this.status = status; + return this; + } + +} diff --git a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/RegistryUpdateParameters.java b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/RegistryUpdateParameters.java new file mode 100644 index 00000000000..ba872fa52ef --- /dev/null +++ b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/RegistryUpdateParameters.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerregistry; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters for updating a container registry. + */ +@JsonFlatten +public class RegistryUpdateParameters { + /** + * The tags for the container registry. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The SKU of the container registry. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * The value that indicates whether the admin user is enabled. + */ + @JsonProperty(value = "properties.adminUserEnabled") + private Boolean adminUserEnabled; + + /** + * The parameters of a storage account for the container registry. Only + * applicable to Classic SKU. If specified, the storage account must be in + * the same physical location as the container registry. + */ + @JsonProperty(value = "properties.storageAccount") + private StorageAccountProperties storageAccount; + + /** + * Get the tags value. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags value. + * + * @param tags the tags value to set + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the sku value. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku value. + * + * @param sku the sku value to set + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the adminUserEnabled value. + * + * @return the adminUserEnabled value + */ + public Boolean adminUserEnabled() { + return this.adminUserEnabled; + } + + /** + * Set the adminUserEnabled value. + * + * @param adminUserEnabled the adminUserEnabled value to set + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withAdminUserEnabled(Boolean adminUserEnabled) { + this.adminUserEnabled = adminUserEnabled; + return this; + } + + /** + * Get the storageAccount value. + * + * @return the storageAccount value + */ + public StorageAccountProperties storageAccount() { + return this.storageAccount; + } + + /** + * Set the storageAccount value. + * + * @param storageAccount the storageAccount value to set + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withStorageAccount(StorageAccountProperties storageAccount) { + this.storageAccount = storageAccount; + return this; + } + +} diff --git a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/TrustPolicy.java b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/TrustPolicy.java new file mode 100644 index 00000000000..10083b7e661 --- /dev/null +++ b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/TrustPolicy.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerregistry; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An object that represents content trust policy for a container registry. + */ +public class TrustPolicy { + /** + * The type of trust policy. Possible values include: 'Notary'. + */ + @JsonProperty(value = "type") + private TrustPolicyType type; + + /** + * The value that indicates whether the policy is enabled or not. Possible + * values include: 'enabled', 'disabled'. + */ + @JsonProperty(value = "status") + private PolicyStatus status; + + /** + * Get the type value. + * + * @return the type value + */ + public TrustPolicyType type() { + return this.type; + } + + /** + * Set the type value. + * + * @param type the type value to set + * @return the TrustPolicy object itself. + */ + public TrustPolicy withType(TrustPolicyType type) { + this.type = type; + return this; + } + + /** + * Get the status value. + * + * @return the status value + */ + public PolicyStatus status() { + return this.status; + } + + /** + * Set the status value. + * + * @param status the status value to set + * @return the TrustPolicy object itself. + */ + public TrustPolicy withStatus(PolicyStatus status) { + this.status = status; + return this; + } + +} diff --git a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/TrustPolicyType.java b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/TrustPolicyType.java new file mode 100644 index 00000000000..e572d48faa0 --- /dev/null +++ b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/TrustPolicyType.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerregistry; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for TrustPolicyType. + */ +public final class TrustPolicyType extends ExpandableStringEnum { + /** Static value Notary for TrustPolicyType. */ + public static final TrustPolicyType NOTARY = fromString("Notary"); + + /** + * Creates or finds a TrustPolicyType from its string representation. + * @param name a name to look for + * @return the corresponding TrustPolicyType + */ + @JsonCreator + public static TrustPolicyType fromString(String name) { + return fromString(name, TrustPolicyType.class); + } + + /** + * @return known TrustPolicyType values + */ + public static Collection values() { + return values(TrustPolicyType.class); + } +} diff --git a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/WebhookAction.java b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/WebhookAction.java index 6298d3e4bb5..c442a5070da 100644 --- a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/WebhookAction.java +++ b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/WebhookAction.java @@ -22,6 +22,9 @@ public final class WebhookAction extends ExpandableStringEnum { /** Static value delete for WebhookAction. */ public static final WebhookAction DELETE = fromString("delete"); + /** Static value quarantine for WebhookAction. */ + public static final WebhookAction QUARANTINE = fromString("quarantine"); + /** * Creates or finds a WebhookAction from its string representation. * @param name a name to look for diff --git a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/WebhookCreateParameters.java b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/WebhookCreateParameters.java new file mode 100644 index 00000000000..071d25235f5 --- /dev/null +++ b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/WebhookCreateParameters.java @@ -0,0 +1,208 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerregistry; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters for creating a webhook. + */ +@JsonFlatten +public class WebhookCreateParameters { + /** + * The tags for the webhook. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The location of the webhook. This cannot be changed after the resource + * is created. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /** + * The service URI for the webhook to post notifications. + */ + @JsonProperty(value = "properties.serviceUri", required = true) + private String serviceUri; + + /** + * Custom headers that will be added to the webhook notifications. + */ + @JsonProperty(value = "properties.customHeaders") + private Map customHeaders; + + /** + * The status of the webhook at the time the operation was called. Possible + * values include: 'enabled', 'disabled'. + */ + @JsonProperty(value = "properties.status") + private WebhookStatus status; + + /** + * The scope of repositories where the event can be triggered. For example, + * 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' + * means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. + * Empty means all events. + */ + @JsonProperty(value = "properties.scope") + private String scope; + + /** + * The list of actions that trigger the webhook to post notifications. + */ + @JsonProperty(value = "properties.actions", required = true) + private List actions; + + /** + * Get the tags value. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags value. + * + * @param tags the tags value to set + * @return the WebhookCreateParameters object itself. + */ + public WebhookCreateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the location value. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set the location value. + * + * @param location the location value to set + * @return the WebhookCreateParameters object itself. + */ + public WebhookCreateParameters withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the serviceUri value. + * + * @return the serviceUri value + */ + public String serviceUri() { + return this.serviceUri; + } + + /** + * Set the serviceUri value. + * + * @param serviceUri the serviceUri value to set + * @return the WebhookCreateParameters object itself. + */ + public WebhookCreateParameters withServiceUri(String serviceUri) { + this.serviceUri = serviceUri; + return this; + } + + /** + * Get the customHeaders value. + * + * @return the customHeaders value + */ + public Map customHeaders() { + return this.customHeaders; + } + + /** + * Set the customHeaders value. + * + * @param customHeaders the customHeaders value to set + * @return the WebhookCreateParameters object itself. + */ + public WebhookCreateParameters withCustomHeaders(Map customHeaders) { + this.customHeaders = customHeaders; + return this; + } + + /** + * Get the status value. + * + * @return the status value + */ + public WebhookStatus status() { + return this.status; + } + + /** + * Set the status value. + * + * @param status the status value to set + * @return the WebhookCreateParameters object itself. + */ + public WebhookCreateParameters withStatus(WebhookStatus status) { + this.status = status; + return this; + } + + /** + * Get the scope value. + * + * @return the scope value + */ + public String scope() { + return this.scope; + } + + /** + * Set the scope value. + * + * @param scope the scope value to set + * @return the WebhookCreateParameters object itself. + */ + public WebhookCreateParameters withScope(String scope) { + this.scope = scope; + return this; + } + + /** + * Get the actions value. + * + * @return the actions value + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions value. + * + * @param actions the actions value to set + * @return the WebhookCreateParameters object itself. + */ + public WebhookCreateParameters withActions(List actions) { + this.actions = actions; + return this; + } + +} diff --git a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/WebhookUpdateParameters.java b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/WebhookUpdateParameters.java new file mode 100644 index 00000000000..e86025498ff --- /dev/null +++ b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/WebhookUpdateParameters.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerregistry; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters for updating a webhook. + */ +@JsonFlatten +public class WebhookUpdateParameters { + /** + * The tags for the webhook. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The service URI for the webhook to post notifications. + */ + @JsonProperty(value = "properties.serviceUri") + private String serviceUri; + + /** + * Custom headers that will be added to the webhook notifications. + */ + @JsonProperty(value = "properties.customHeaders") + private Map customHeaders; + + /** + * The status of the webhook at the time the operation was called. Possible + * values include: 'enabled', 'disabled'. + */ + @JsonProperty(value = "properties.status") + private WebhookStatus status; + + /** + * The scope of repositories where the event can be triggered. For example, + * 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' + * means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. + * Empty means all events. + */ + @JsonProperty(value = "properties.scope") + private String scope; + + /** + * The list of actions that trigger the webhook to post notifications. + */ + @JsonProperty(value = "properties.actions") + private List actions; + + /** + * Get the tags value. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags value. + * + * @param tags the tags value to set + * @return the WebhookUpdateParameters object itself. + */ + public WebhookUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the serviceUri value. + * + * @return the serviceUri value + */ + public String serviceUri() { + return this.serviceUri; + } + + /** + * Set the serviceUri value. + * + * @param serviceUri the serviceUri value to set + * @return the WebhookUpdateParameters object itself. + */ + public WebhookUpdateParameters withServiceUri(String serviceUri) { + this.serviceUri = serviceUri; + return this; + } + + /** + * Get the customHeaders value. + * + * @return the customHeaders value + */ + public Map customHeaders() { + return this.customHeaders; + } + + /** + * Set the customHeaders value. + * + * @param customHeaders the customHeaders value to set + * @return the WebhookUpdateParameters object itself. + */ + public WebhookUpdateParameters withCustomHeaders(Map customHeaders) { + this.customHeaders = customHeaders; + return this; + } + + /** + * Get the status value. + * + * @return the status value + */ + public WebhookStatus status() { + return this.status; + } + + /** + * Set the status value. + * + * @param status the status value to set + * @return the WebhookUpdateParameters object itself. + */ + public WebhookUpdateParameters withStatus(WebhookStatus status) { + this.status = status; + return this; + } + + /** + * Get the scope value. + * + * @return the scope value + */ + public String scope() { + return this.scope; + } + + /** + * Set the scope value. + * + * @param scope the scope value to set + * @return the WebhookUpdateParameters object itself. + */ + public WebhookUpdateParameters withScope(String scope) { + this.scope = scope; + return this; + } + + /** + * Get the actions value. + * + * @return the actions value + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions value. + * + * @param actions the actions value to set + * @return the WebhookUpdateParameters object itself. + */ + public WebhookUpdateParameters withActions(List actions) { + this.actions = actions; + return this; + } + +} diff --git a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/implementation/OperationDefinitionInner.java b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/implementation/OperationDefinitionInner.java index d16350449c5..ed34b9f9f80 100644 --- a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/implementation/OperationDefinitionInner.java +++ b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/implementation/OperationDefinitionInner.java @@ -9,12 +9,21 @@ package com.microsoft.azure.management.containerregistry.implementation; import com.microsoft.azure.management.containerregistry.OperationDisplayDefinition; +import com.microsoft.azure.management.containerregistry.OperationServiceSpecificationDefinition; import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; /** * The definition of a container registry operation. */ +@JsonFlatten public class OperationDefinitionInner { + /** + * The origin information of the container registry operation. + */ + @JsonProperty(value = "origin") + private String origin; + /** * Operation name: {provider}/{resource}/{operation}. */ @@ -27,6 +36,32 @@ public class OperationDefinitionInner { @JsonProperty(value = "display") private OperationDisplayDefinition display; + /** + * The definition of Azure Monitoring service. + */ + @JsonProperty(value = "properties.serviceSpecification") + private OperationServiceSpecificationDefinition serviceSpecification; + + /** + * Get the origin value. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Set the origin value. + * + * @param origin the origin value to set + * @return the OperationDefinitionInner object itself. + */ + public OperationDefinitionInner withOrigin(String origin) { + this.origin = origin; + return this; + } + /** * Get the name value. * @@ -67,4 +102,24 @@ public OperationDefinitionInner withDisplay(OperationDisplayDefinition display) return this; } + /** + * Get the serviceSpecification value. + * + * @return the serviceSpecification value + */ + public OperationServiceSpecificationDefinition serviceSpecification() { + return this.serviceSpecification; + } + + /** + * Set the serviceSpecification value. + * + * @param serviceSpecification the serviceSpecification value to set + * @return the OperationDefinitionInner object itself. + */ + public OperationDefinitionInner withServiceSpecification(OperationServiceSpecificationDefinition serviceSpecification) { + this.serviceSpecification = serviceSpecification; + return this; + } + } diff --git a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/implementation/RegistriesInner.java b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/implementation/RegistriesInner.java index 299d1e5423c..ec55dc7381c 100644 --- a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/implementation/RegistriesInner.java +++ b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/implementation/RegistriesInner.java @@ -16,9 +16,11 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.containerregistry.ImportImageParameters; import com.microsoft.azure.management.containerregistry.PasswordName; import com.microsoft.azure.management.containerregistry.RegenerateCredentialParameters; import com.microsoft.azure.management.containerregistry.RegistryNameCheckRequest; +import com.microsoft.azure.management.containerregistry.RegistryUpdateParameters; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -71,11 +73,11 @@ public RegistriesInner(Retrofit retrofit, ContainerRegistryManagementClientImpl interface RegistriesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.Registries importImage" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage") - Observable> importImage(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Query("api-version") String apiVersion, @Body ImportImageParametersInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> importImage(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Query("api-version") String apiVersion, @Body ImportImageParameters parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.Registries beginImportImage" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage") - Observable> beginImportImage(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Query("api-version") String apiVersion, @Body ImportImageParametersInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginImportImage(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Query("api-version") String apiVersion, @Body ImportImageParameters parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.Registries checkNameAvailability" }) @POST("subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability") @@ -103,11 +105,11 @@ interface RegistriesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.Registries update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Query("api-version") String apiVersion, @Body RegistryUpdateParametersInner registryUpdateParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Query("api-version") String apiVersion, @Body RegistryUpdateParameters registryUpdateParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.Registries beginUpdate" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}") - Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Query("api-version") String apiVersion, @Body RegistryUpdateParametersInner registryUpdateParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Query("api-version") String apiVersion, @Body RegistryUpdateParameters registryUpdateParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.Registries listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries") @@ -129,6 +131,18 @@ interface RegistriesService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages") Observable> listUsages(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.Registries listPolicies" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listPolicies") + Observable> listPolicies(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.Registries updatePolicies" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/updatePolicies") + Observable> updatePolicies(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Query("api-version") String apiVersion, @Body RegistryPoliciesInner registryPoliciesUpdateParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.Registries beginUpdatePolicies" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/updatePolicies") + Observable> beginUpdatePolicies(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Query("api-version") String apiVersion, @Body RegistryPoliciesInner registryPoliciesUpdateParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.Registries listByResourceGroupNext" }) @GET Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -149,7 +163,7 @@ interface RegistriesService { * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ - public void importImage(String resourceGroupName, String registryName, ImportImageParametersInner parameters) { + public void importImage(String resourceGroupName, String registryName, ImportImageParameters parameters) { importImageWithServiceResponseAsync(resourceGroupName, registryName, parameters).toBlocking().last().body(); } @@ -163,7 +177,7 @@ public void importImage(String resourceGroupName, String registryName, ImportIma * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture importImageAsync(String resourceGroupName, String registryName, ImportImageParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture importImageAsync(String resourceGroupName, String registryName, ImportImageParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(importImageWithServiceResponseAsync(resourceGroupName, registryName, parameters), serviceCallback); } @@ -176,7 +190,7 @@ public ServiceFuture importImageAsync(String resourceGroupName, String reg * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable importImageAsync(String resourceGroupName, String registryName, ImportImageParametersInner parameters) { + public Observable importImageAsync(String resourceGroupName, String registryName, ImportImageParameters parameters) { return importImageWithServiceResponseAsync(resourceGroupName, registryName, parameters).map(new Func1, Void>() { @Override public Void call(ServiceResponse response) { @@ -194,7 +208,7 @@ public Void call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> importImageWithServiceResponseAsync(String resourceGroupName, String registryName, ImportImageParametersInner parameters) { + public Observable> importImageWithServiceResponseAsync(String resourceGroupName, String registryName, ImportImageParameters parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -225,7 +239,7 @@ public Observable> importImageWithServiceResponseAsync(Str * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ - public void beginImportImage(String resourceGroupName, String registryName, ImportImageParametersInner parameters) { + public void beginImportImage(String resourceGroupName, String registryName, ImportImageParameters parameters) { beginImportImageWithServiceResponseAsync(resourceGroupName, registryName, parameters).toBlocking().single().body(); } @@ -239,7 +253,7 @@ public void beginImportImage(String resourceGroupName, String registryName, Impo * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginImportImageAsync(String resourceGroupName, String registryName, ImportImageParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginImportImageAsync(String resourceGroupName, String registryName, ImportImageParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginImportImageWithServiceResponseAsync(resourceGroupName, registryName, parameters), serviceCallback); } @@ -252,7 +266,7 @@ public ServiceFuture beginImportImageAsync(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable beginImportImageAsync(String resourceGroupName, String registryName, ImportImageParametersInner parameters) { + public Observable beginImportImageAsync(String resourceGroupName, String registryName, ImportImageParameters parameters) { return beginImportImageWithServiceResponseAsync(resourceGroupName, registryName, parameters).map(new Func1, Void>() { @Override public Void call(ServiceResponse response) { @@ -270,7 +284,7 @@ public Void call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable> beginImportImageWithServiceResponseAsync(String resourceGroupName, String registryName, ImportImageParametersInner parameters) { + public Observable> beginImportImageWithServiceResponseAsync(String resourceGroupName, String registryName, ImportImageParameters parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -814,7 +828,7 @@ private ServiceResponse beginDeleteDelegate(Response respons * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the RegistryInner object if successful. */ - public RegistryInner update(String resourceGroupName, String registryName, RegistryUpdateParametersInner registryUpdateParameters) { + public RegistryInner update(String resourceGroupName, String registryName, RegistryUpdateParameters registryUpdateParameters) { return updateWithServiceResponseAsync(resourceGroupName, registryName, registryUpdateParameters).toBlocking().last().body(); } @@ -828,7 +842,7 @@ public RegistryInner update(String resourceGroupName, String registryName, Regis * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String resourceGroupName, String registryName, RegistryUpdateParametersInner registryUpdateParameters, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String registryName, RegistryUpdateParameters registryUpdateParameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, registryName, registryUpdateParameters), serviceCallback); } @@ -841,7 +855,7 @@ public ServiceFuture updateAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable updateAsync(String resourceGroupName, String registryName, RegistryUpdateParametersInner registryUpdateParameters) { + public Observable updateAsync(String resourceGroupName, String registryName, RegistryUpdateParameters registryUpdateParameters) { return updateWithServiceResponseAsync(resourceGroupName, registryName, registryUpdateParameters).map(new Func1, RegistryInner>() { @Override public RegistryInner call(ServiceResponse response) { @@ -859,7 +873,7 @@ public RegistryInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String registryName, RegistryUpdateParametersInner registryUpdateParameters) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String registryName, RegistryUpdateParameters registryUpdateParameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -891,7 +905,7 @@ public Observable> updateWithServiceResponseAsync * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the RegistryInner object if successful. */ - public RegistryInner beginUpdate(String resourceGroupName, String registryName, RegistryUpdateParametersInner registryUpdateParameters) { + public RegistryInner beginUpdate(String resourceGroupName, String registryName, RegistryUpdateParameters registryUpdateParameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, registryName, registryUpdateParameters).toBlocking().single().body(); } @@ -905,7 +919,7 @@ public RegistryInner beginUpdate(String resourceGroupName, String registryName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateAsync(String resourceGroupName, String registryName, RegistryUpdateParametersInner registryUpdateParameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginUpdateAsync(String resourceGroupName, String registryName, RegistryUpdateParameters registryUpdateParameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, registryName, registryUpdateParameters), serviceCallback); } @@ -918,7 +932,7 @@ public ServiceFuture beginUpdateAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the RegistryInner object */ - public Observable beginUpdateAsync(String resourceGroupName, String registryName, RegistryUpdateParametersInner registryUpdateParameters) { + public Observable beginUpdateAsync(String resourceGroupName, String registryName, RegistryUpdateParameters registryUpdateParameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, registryName, registryUpdateParameters).map(new Func1, RegistryInner>() { @Override public RegistryInner call(ServiceResponse response) { @@ -936,7 +950,7 @@ public RegistryInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the RegistryInner object */ - public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String registryName, RegistryUpdateParametersInner registryUpdateParameters) { + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String registryName, RegistryUpdateParameters registryUpdateParameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1464,6 +1478,264 @@ private ServiceResponse listUsagesDelegate(Respons .build(response); } + /** + * Lists the policies for the specified container registry. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RegistryPoliciesInner object if successful. + */ + public RegistryPoliciesInner listPolicies(String resourceGroupName, String registryName) { + return listPoliciesWithServiceResponseAsync(resourceGroupName, registryName).toBlocking().single().body(); + } + + /** + * Lists the policies for the specified container registry. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listPoliciesAsync(String resourceGroupName, String registryName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listPoliciesWithServiceResponseAsync(resourceGroupName, registryName), serviceCallback); + } + + /** + * Lists the policies for the specified container registry. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RegistryPoliciesInner object + */ + public Observable listPoliciesAsync(String resourceGroupName, String registryName) { + return listPoliciesWithServiceResponseAsync(resourceGroupName, registryName).map(new Func1, RegistryPoliciesInner>() { + @Override + public RegistryPoliciesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists the policies for the specified container registry. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RegistryPoliciesInner object + */ + public Observable> listPoliciesWithServiceResponseAsync(String resourceGroupName, String registryName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (registryName == null) { + throw new IllegalArgumentException("Parameter registryName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listPolicies(this.client.subscriptionId(), resourceGroupName, registryName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listPoliciesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listPoliciesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the policies for the specified container registry. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param registryPoliciesUpdateParameters The parameters for updating policies of a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RegistryPoliciesInner object if successful. + */ + public RegistryPoliciesInner updatePolicies(String resourceGroupName, String registryName, RegistryPoliciesInner registryPoliciesUpdateParameters) { + return updatePoliciesWithServiceResponseAsync(resourceGroupName, registryName, registryPoliciesUpdateParameters).toBlocking().last().body(); + } + + /** + * Updates the policies for the specified container registry. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param registryPoliciesUpdateParameters The parameters for updating policies of a container registry. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updatePoliciesAsync(String resourceGroupName, String registryName, RegistryPoliciesInner registryPoliciesUpdateParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updatePoliciesWithServiceResponseAsync(resourceGroupName, registryName, registryPoliciesUpdateParameters), serviceCallback); + } + + /** + * Updates the policies for the specified container registry. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param registryPoliciesUpdateParameters The parameters for updating policies of a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updatePoliciesAsync(String resourceGroupName, String registryName, RegistryPoliciesInner registryPoliciesUpdateParameters) { + return updatePoliciesWithServiceResponseAsync(resourceGroupName, registryName, registryPoliciesUpdateParameters).map(new Func1, RegistryPoliciesInner>() { + @Override + public RegistryPoliciesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the policies for the specified container registry. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param registryPoliciesUpdateParameters The parameters for updating policies of a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updatePoliciesWithServiceResponseAsync(String resourceGroupName, String registryName, RegistryPoliciesInner registryPoliciesUpdateParameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (registryName == null) { + throw new IllegalArgumentException("Parameter registryName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (registryPoliciesUpdateParameters == null) { + throw new IllegalArgumentException("Parameter registryPoliciesUpdateParameters is required and cannot be null."); + } + Validator.validate(registryPoliciesUpdateParameters); + Observable> observable = service.updatePolicies(this.client.subscriptionId(), resourceGroupName, registryName, this.client.apiVersion(), registryPoliciesUpdateParameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates the policies for the specified container registry. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param registryPoliciesUpdateParameters The parameters for updating policies of a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RegistryPoliciesInner object if successful. + */ + public RegistryPoliciesInner beginUpdatePolicies(String resourceGroupName, String registryName, RegistryPoliciesInner registryPoliciesUpdateParameters) { + return beginUpdatePoliciesWithServiceResponseAsync(resourceGroupName, registryName, registryPoliciesUpdateParameters).toBlocking().single().body(); + } + + /** + * Updates the policies for the specified container registry. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param registryPoliciesUpdateParameters The parameters for updating policies of a container registry. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdatePoliciesAsync(String resourceGroupName, String registryName, RegistryPoliciesInner registryPoliciesUpdateParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdatePoliciesWithServiceResponseAsync(resourceGroupName, registryName, registryPoliciesUpdateParameters), serviceCallback); + } + + /** + * Updates the policies for the specified container registry. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param registryPoliciesUpdateParameters The parameters for updating policies of a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RegistryPoliciesInner object + */ + public Observable beginUpdatePoliciesAsync(String resourceGroupName, String registryName, RegistryPoliciesInner registryPoliciesUpdateParameters) { + return beginUpdatePoliciesWithServiceResponseAsync(resourceGroupName, registryName, registryPoliciesUpdateParameters).map(new Func1, RegistryPoliciesInner>() { + @Override + public RegistryPoliciesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the policies for the specified container registry. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param registryPoliciesUpdateParameters The parameters for updating policies of a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RegistryPoliciesInner object + */ + public Observable> beginUpdatePoliciesWithServiceResponseAsync(String resourceGroupName, String registryName, RegistryPoliciesInner registryPoliciesUpdateParameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (registryName == null) { + throw new IllegalArgumentException("Parameter registryName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (registryPoliciesUpdateParameters == null) { + throw new IllegalArgumentException("Parameter registryPoliciesUpdateParameters is required and cannot be null."); + } + Validator.validate(registryPoliciesUpdateParameters); + return service.beginUpdatePolicies(this.client.subscriptionId(), resourceGroupName, registryName, this.client.apiVersion(), registryPoliciesUpdateParameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdatePoliciesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdatePoliciesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Lists all the container registries under the specified resource group. * diff --git a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/implementation/RegistryPoliciesInner.java b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/implementation/RegistryPoliciesInner.java new file mode 100644 index 00000000000..9b95fc5eecc --- /dev/null +++ b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/implementation/RegistryPoliciesInner.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerregistry.implementation; + +import com.microsoft.azure.management.containerregistry.QuarantinePolicy; +import com.microsoft.azure.management.containerregistry.TrustPolicy; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An object that represents policies for a container registry. + */ +public class RegistryPoliciesInner { + /** + * An object that represents quarantine policy for a container registry. + */ + @JsonProperty(value = "quarantinePolicy") + private QuarantinePolicy quarantinePolicy; + + /** + * An object that represents content trust policy for a container registry. + */ + @JsonProperty(value = "trustPolicy") + private TrustPolicy trustPolicy; + + /** + * Get the quarantinePolicy value. + * + * @return the quarantinePolicy value + */ + public QuarantinePolicy quarantinePolicy() { + return this.quarantinePolicy; + } + + /** + * Set the quarantinePolicy value. + * + * @param quarantinePolicy the quarantinePolicy value to set + * @return the RegistryPoliciesInner object itself. + */ + public RegistryPoliciesInner withQuarantinePolicy(QuarantinePolicy quarantinePolicy) { + this.quarantinePolicy = quarantinePolicy; + return this; + } + + /** + * Get the trustPolicy value. + * + * @return the trustPolicy value + */ + public TrustPolicy trustPolicy() { + return this.trustPolicy; + } + + /** + * Set the trustPolicy value. + * + * @param trustPolicy the trustPolicy value to set + * @return the RegistryPoliciesInner object itself. + */ + public RegistryPoliciesInner withTrustPolicy(TrustPolicy trustPolicy) { + this.trustPolicy = trustPolicy; + return this; + } + +} diff --git a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/implementation/WebhooksInner.java b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/implementation/WebhooksInner.java index c7b23fd8161..06e832206c4 100644 --- a/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/implementation/WebhooksInner.java +++ b/azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/implementation/WebhooksInner.java @@ -13,6 +13,8 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.containerregistry.WebhookCreateParameters; +import com.microsoft.azure.management.containerregistry.WebhookUpdateParameters; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -69,11 +71,11 @@ interface WebhooksService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.Webhooks create" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}") - Observable> create(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("webhookName") String webhookName, @Query("api-version") String apiVersion, @Body WebhookCreateParametersInner webhookCreateParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> create(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("webhookName") String webhookName, @Query("api-version") String apiVersion, @Body WebhookCreateParameters webhookCreateParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.Webhooks beginCreate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}") - Observable> beginCreate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("webhookName") String webhookName, @Query("api-version") String apiVersion, @Body WebhookCreateParametersInner webhookCreateParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginCreate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("webhookName") String webhookName, @Query("api-version") String apiVersion, @Body WebhookCreateParameters webhookCreateParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.Webhooks delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}", method = "DELETE", hasBody = true) @@ -85,11 +87,11 @@ interface WebhooksService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.Webhooks update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("webhookName") String webhookName, @Query("api-version") String apiVersion, @Body WebhookUpdateParametersInner webhookUpdateParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("webhookName") String webhookName, @Query("api-version") String apiVersion, @Body WebhookUpdateParameters webhookUpdateParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.Webhooks beginUpdate" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}") - Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("webhookName") String webhookName, @Query("api-version") String apiVersion, @Body WebhookUpdateParametersInner webhookUpdateParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("webhookName") String webhookName, @Query("api-version") String apiVersion, @Body WebhookUpdateParameters webhookUpdateParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.Webhooks list" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks") @@ -222,7 +224,7 @@ private ServiceResponse getDelegate(Response respons * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the WebhookInner object if successful. */ - public WebhookInner create(String resourceGroupName, String registryName, String webhookName, WebhookCreateParametersInner webhookCreateParameters) { + public WebhookInner create(String resourceGroupName, String registryName, String webhookName, WebhookCreateParameters webhookCreateParameters) { return createWithServiceResponseAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters).toBlocking().last().body(); } @@ -237,7 +239,7 @@ public WebhookInner create(String resourceGroupName, String registryName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture createAsync(String resourceGroupName, String registryName, String webhookName, WebhookCreateParametersInner webhookCreateParameters, final ServiceCallback serviceCallback) { + public ServiceFuture createAsync(String resourceGroupName, String registryName, String webhookName, WebhookCreateParameters webhookCreateParameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters), serviceCallback); } @@ -251,7 +253,7 @@ public ServiceFuture createAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable createAsync(String resourceGroupName, String registryName, String webhookName, WebhookCreateParametersInner webhookCreateParameters) { + public Observable createAsync(String resourceGroupName, String registryName, String webhookName, WebhookCreateParameters webhookCreateParameters) { return createWithServiceResponseAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters).map(new Func1, WebhookInner>() { @Override public WebhookInner call(ServiceResponse response) { @@ -270,7 +272,7 @@ public WebhookInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> createWithServiceResponseAsync(String resourceGroupName, String registryName, String webhookName, WebhookCreateParametersInner webhookCreateParameters) { + public Observable> createWithServiceResponseAsync(String resourceGroupName, String registryName, String webhookName, WebhookCreateParameters webhookCreateParameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -306,7 +308,7 @@ public Observable> createWithServiceResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the WebhookInner object if successful. */ - public WebhookInner beginCreate(String resourceGroupName, String registryName, String webhookName, WebhookCreateParametersInner webhookCreateParameters) { + public WebhookInner beginCreate(String resourceGroupName, String registryName, String webhookName, WebhookCreateParameters webhookCreateParameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters).toBlocking().single().body(); } @@ -321,7 +323,7 @@ public WebhookInner beginCreate(String resourceGroupName, String registryName, S * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginCreateAsync(String resourceGroupName, String registryName, String webhookName, WebhookCreateParametersInner webhookCreateParameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginCreateAsync(String resourceGroupName, String registryName, String webhookName, WebhookCreateParameters webhookCreateParameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters), serviceCallback); } @@ -335,7 +337,7 @@ public ServiceFuture beginCreateAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the WebhookInner object */ - public Observable beginCreateAsync(String resourceGroupName, String registryName, String webhookName, WebhookCreateParametersInner webhookCreateParameters) { + public Observable beginCreateAsync(String resourceGroupName, String registryName, String webhookName, WebhookCreateParameters webhookCreateParameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters).map(new Func1, WebhookInner>() { @Override public WebhookInner call(ServiceResponse response) { @@ -354,7 +356,7 @@ public WebhookInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the WebhookInner object */ - public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String registryName, String webhookName, WebhookCreateParametersInner webhookCreateParameters) { + public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String registryName, String webhookName, WebhookCreateParameters webhookCreateParameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -577,7 +579,7 @@ private ServiceResponse beginDeleteDelegate(Response respons * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the WebhookInner object if successful. */ - public WebhookInner update(String resourceGroupName, String registryName, String webhookName, WebhookUpdateParametersInner webhookUpdateParameters) { + public WebhookInner update(String resourceGroupName, String registryName, String webhookName, WebhookUpdateParameters webhookUpdateParameters) { return updateWithServiceResponseAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters).toBlocking().last().body(); } @@ -592,7 +594,7 @@ public WebhookInner update(String resourceGroupName, String registryName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String resourceGroupName, String registryName, String webhookName, WebhookUpdateParametersInner webhookUpdateParameters, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String registryName, String webhookName, WebhookUpdateParameters webhookUpdateParameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters), serviceCallback); } @@ -606,7 +608,7 @@ public ServiceFuture updateAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable updateAsync(String resourceGroupName, String registryName, String webhookName, WebhookUpdateParametersInner webhookUpdateParameters) { + public Observable updateAsync(String resourceGroupName, String registryName, String webhookName, WebhookUpdateParameters webhookUpdateParameters) { return updateWithServiceResponseAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters).map(new Func1, WebhookInner>() { @Override public WebhookInner call(ServiceResponse response) { @@ -625,7 +627,7 @@ public WebhookInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String registryName, String webhookName, WebhookUpdateParametersInner webhookUpdateParameters) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String registryName, String webhookName, WebhookUpdateParameters webhookUpdateParameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -661,7 +663,7 @@ public Observable> updateWithServiceResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the WebhookInner object if successful. */ - public WebhookInner beginUpdate(String resourceGroupName, String registryName, String webhookName, WebhookUpdateParametersInner webhookUpdateParameters) { + public WebhookInner beginUpdate(String resourceGroupName, String registryName, String webhookName, WebhookUpdateParameters webhookUpdateParameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters).toBlocking().single().body(); } @@ -676,7 +678,7 @@ public WebhookInner beginUpdate(String resourceGroupName, String registryName, S * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateAsync(String resourceGroupName, String registryName, String webhookName, WebhookUpdateParametersInner webhookUpdateParameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginUpdateAsync(String resourceGroupName, String registryName, String webhookName, WebhookUpdateParameters webhookUpdateParameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters), serviceCallback); } @@ -690,7 +692,7 @@ public ServiceFuture beginUpdateAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the WebhookInner object */ - public Observable beginUpdateAsync(String resourceGroupName, String registryName, String webhookName, WebhookUpdateParametersInner webhookUpdateParameters) { + public Observable beginUpdateAsync(String resourceGroupName, String registryName, String webhookName, WebhookUpdateParameters webhookUpdateParameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters).map(new Func1, WebhookInner>() { @Override public WebhookInner call(ServiceResponse response) { @@ -709,7 +711,7 @@ public WebhookInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the WebhookInner object */ - public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String registryName, String webhookName, WebhookUpdateParametersInner webhookUpdateParameters) { + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String registryName, String webhookName, WebhookUpdateParameters webhookUpdateParameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); }