diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/pom.xml b/sdk/containerregistry/mgmt-v2018_02_01_preview/pom.xml index 21037954ed725..11494bf68d2db 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/pom.xml +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/pom.xml @@ -11,8 +11,8 @@ com.microsoft.azure azure-arm-parent - 1.2.0 - ../../parents/azure-arm-parent + 1.1.0 + ../../../pom.management.xml azure-mgmt-containerregistry 1.0.0-beta @@ -71,6 +71,8 @@ azure-arm-client-runtime test-jar test + + 1.6.5 diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/Action.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/Action.java new file mode 100644 index 0000000000000..e4756a9b45430 --- /dev/null +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/Action.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.v2018_02_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Action. + */ +public final class Action extends ExpandableStringEnum { + /** Static value Allow for Action. */ + public static final Action ALLOW = fromString("Allow"); + + /** + * Creates or finds a Action from its string representation. + * @param name a name to look for + * @return the corresponding Action + */ + @JsonCreator + public static Action fromString(String name) { + return fromString(name, Action.class); + } + + /** + * @return known Action values + */ + public static Collection values() { + return values(Action.class); + } +} diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/BuildStepProperties.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/BuildStepProperties.java index e18ebf839f50d..b25e831253dba 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/BuildStepProperties.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/BuildStepProperties.java @@ -16,7 +16,7 @@ /** * Base properties for any build step. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = BuildStepProperties.class) @JsonTypeName("BuildStepProperties") @JsonSubTypes({ @JsonSubTypes.Type(name = "Docker", value = DockerBuildStep.class) diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/BuildStepPropertiesUpdateParameters.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/BuildStepPropertiesUpdateParameters.java index a8c2352e8fdb2..1b44809d6eb6c 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/BuildStepPropertiesUpdateParameters.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/BuildStepPropertiesUpdateParameters.java @@ -15,7 +15,7 @@ /** * The properties for updating a build step. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = BuildStepPropertiesUpdateParameters.class) @JsonTypeName("BuildStepPropertiesUpdateParameters") @JsonSubTypes({ @JsonSubTypes.Type(name = "Docker", value = DockerBuildStepUpdateParameters.class) diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/BuildTaskBuildRequest.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/BuildTaskBuildRequest.java index 1a37d8f51cf6c..e77036f50b8c7 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/BuildTaskBuildRequest.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/BuildTaskBuildRequest.java @@ -15,7 +15,7 @@ /** * The queue build parameters based on a build task. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = BuildTaskBuildRequest.class) @JsonTypeName("BuildTask") public class BuildTaskBuildRequest extends QueueBuildRequest { /** diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/DefaultAction.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/DefaultAction.java new file mode 100644 index 0000000000000..fe0b8fec4d8f2 --- /dev/null +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/DefaultAction.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.v2018_02_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DefaultAction. + */ +public final class DefaultAction extends ExpandableStringEnum { + /** Static value Allow for DefaultAction. */ + public static final DefaultAction ALLOW = fromString("Allow"); + + /** Static value Deny for DefaultAction. */ + public static final DefaultAction DENY = fromString("Deny"); + + /** + * Creates or finds a DefaultAction from its string representation. + * @param name a name to look for + * @return the corresponding DefaultAction + */ + @JsonCreator + public static DefaultAction fromString(String name) { + return fromString(name, DefaultAction.class); + } + + /** + * @return known DefaultAction values + */ + public static Collection values() { + return values(DefaultAction.class); + } +} diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/DockerBuildStep.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/DockerBuildStep.java index 8a8ce7528c8a8..5d4db0cd3ba41 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/DockerBuildStep.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/DockerBuildStep.java @@ -17,7 +17,7 @@ /** * The Docker build step. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = DockerBuildStep.class) @JsonTypeName("Docker") public class DockerBuildStep extends BuildStepProperties { /** diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/DockerBuildStepUpdateParameters.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/DockerBuildStepUpdateParameters.java index 05895e01f5dda..fc722afcf168b 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/DockerBuildStepUpdateParameters.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/DockerBuildStepUpdateParameters.java @@ -17,7 +17,7 @@ /** * The properties for updating a docker build step. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = DockerBuildStepUpdateParameters.class) @JsonTypeName("Docker") public class DockerBuildStepUpdateParameters extends BuildStepPropertiesUpdateParameters { /** diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/IPRule.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/IPRule.java new file mode 100644 index 0000000000000..2067b99d1e451 --- /dev/null +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/IPRule.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.v2018_02_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * IP rule with specific IP or IP range in CIDR format. + */ +public class IPRule { + /** + * The action of IP ACL rule. Possible values include: 'Allow'. + */ + @JsonProperty(value = "action") + private Action action; + + /** + * Specifies the IP or IP range in CIDR format. Only IPV4 address is + * allowed. + */ + @JsonProperty(value = "value", required = true) + private String iPAddressOrRange; + + /** + * Get the action of IP ACL rule. Possible values include: 'Allow'. + * + * @return the action value + */ + public Action action() { + return this.action; + } + + /** + * Set the action of IP ACL rule. Possible values include: 'Allow'. + * + * @param action the action value to set + * @return the IPRule object itself. + */ + public IPRule withAction(Action action) { + this.action = action; + return this; + } + + /** + * Get specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. + * + * @return the iPAddressOrRange value + */ + public String iPAddressOrRange() { + return this.iPAddressOrRange; + } + + /** + * Set specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. + * + * @param iPAddressOrRange the iPAddressOrRange value to set + * @return the IPRule object itself. + */ + public IPRule withIPAddressOrRange(String iPAddressOrRange) { + this.iPAddressOrRange = iPAddressOrRange; + return this; + } + +} diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/ImportSource.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/ImportSource.java index 5376d6b36bc6a..62c4bb669a82a 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/ImportSource.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/ImportSource.java @@ -21,11 +21,17 @@ public class ImportSource { private String resourceId; /** - * The address of the source registry. + * The address of the source registry (e.g. 'mcr.microsoft.com'). */ @JsonProperty(value = "registryUri") private String registryUri; + /** + * Credentials used when importing from a registry uri. + */ + @JsonProperty(value = "credentials") + private ImportSourceCredentials credentials; + /** * Repository name of the source image. * Specify an image by repository ('hello-world'). This will use the @@ -58,7 +64,7 @@ public ImportSource withResourceId(String resourceId) { } /** - * Get the address of the source registry. + * Get the address of the source registry (e.g. 'mcr.microsoft.com'). * * @return the registryUri value */ @@ -67,7 +73,7 @@ public String registryUri() { } /** - * Set the address of the source registry. + * Set the address of the source registry (e.g. 'mcr.microsoft.com'). * * @param registryUri the registryUri value to set * @return the ImportSource object itself. @@ -77,6 +83,26 @@ public ImportSource withRegistryUri(String registryUri) { return this; } + /** + * Get credentials used when importing from a registry uri. + * + * @return the credentials value + */ + public ImportSourceCredentials credentials() { + return this.credentials; + } + + /** + * Set credentials used when importing from a registry uri. + * + * @param credentials the credentials value to set + * @return the ImportSource object itself. + */ + public ImportSource withCredentials(ImportSourceCredentials credentials) { + this.credentials = credentials; + return this; + } + /** * Get repository name of the source image. Specify an image by repository ('hello-world'). This will use the 'latest' tag. diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/ImportSourceCredentials.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/ImportSourceCredentials.java new file mode 100644 index 0000000000000..9f641ddcfe3a2 --- /dev/null +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/ImportSourceCredentials.java @@ -0,0 +1,69 @@ +/** + * 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.v2018_02_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ImportSourceCredentials model. + */ +public class ImportSourceCredentials { + /** + * The username to authenticate with the source registry. + */ + @JsonProperty(value = "username") + private String username; + + /** + * The password used to authenticate with the source registry. + */ + @JsonProperty(value = "password", required = true) + private String password; + + /** + * Get the username to authenticate with the source registry. + * + * @return the username value + */ + public String username() { + return this.username; + } + + /** + * Set the username to authenticate with the source registry. + * + * @param username the username value to set + * @return the ImportSourceCredentials object itself. + */ + public ImportSourceCredentials withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the password used to authenticate with the source registry. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set the password used to authenticate with the source registry. + * + * @param password the password value to set + * @return the ImportSourceCredentials object itself. + */ + public ImportSourceCredentials withPassword(String password) { + this.password = password; + return this; + } + +} diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/NetworkRuleSet.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/NetworkRuleSet.java new file mode 100644 index 0000000000000..5394c6d54f48a --- /dev/null +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/NetworkRuleSet.java @@ -0,0 +1,97 @@ +/** + * 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.v2018_02_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The network rule set for a container registry. + */ +public class NetworkRuleSet { + /** + * The default action of allow or deny when no other rules match. Possible + * values include: 'Allow', 'Deny'. + */ + @JsonProperty(value = "defaultAction", required = true) + private DefaultAction defaultAction; + + /** + * The virtual network rules. + */ + @JsonProperty(value = "virtualNetworkRules") + private List virtualNetworkRules; + + /** + * The IP ACL rules. + */ + @JsonProperty(value = "ipRules") + private List ipRules; + + /** + * Get the default action of allow or deny when no other rules match. Possible values include: 'Allow', 'Deny'. + * + * @return the defaultAction value + */ + public DefaultAction defaultAction() { + return this.defaultAction; + } + + /** + * Set the default action of allow or deny when no other rules match. Possible values include: 'Allow', 'Deny'. + * + * @param defaultAction the defaultAction value to set + * @return the NetworkRuleSet object itself. + */ + public NetworkRuleSet withDefaultAction(DefaultAction defaultAction) { + this.defaultAction = defaultAction; + return this; + } + + /** + * Get the virtual network rules. + * + * @return the virtualNetworkRules value + */ + public List virtualNetworkRules() { + return this.virtualNetworkRules; + } + + /** + * Set the virtual network rules. + * + * @param virtualNetworkRules the virtualNetworkRules value to set + * @return the NetworkRuleSet object itself. + */ + public NetworkRuleSet withVirtualNetworkRules(List virtualNetworkRules) { + this.virtualNetworkRules = virtualNetworkRules; + return this; + } + + /** + * Get the IP ACL rules. + * + * @return the ipRules value + */ + public List ipRules() { + return this.ipRules; + } + + /** + * Set the IP ACL rules. + * + * @param ipRules the ipRules value to set + * @return the NetworkRuleSet object itself. + */ + public NetworkRuleSet withIpRules(List ipRules) { + this.ipRules = ipRules; + return this; + } + +} diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/QueueBuildRequest.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/QueueBuildRequest.java index d06a38bf47964..552f1316cd7d1 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/QueueBuildRequest.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/QueueBuildRequest.java @@ -15,7 +15,7 @@ /** * The queue build request parameters. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = QueueBuildRequest.class) @JsonTypeName("QueueBuildRequest") @JsonSubTypes({ @JsonSubTypes.Type(name = "BuildTask", value = BuildTaskBuildRequest.class), diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/QuickBuildRequest.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/QuickBuildRequest.java index 4dbbefb40ffb5..12f908f7ec8cd 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/QuickBuildRequest.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/QuickBuildRequest.java @@ -17,7 +17,7 @@ /** * The queue build request parameters for a quick build. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = QuickBuildRequest.class) @JsonTypeName("QuickBuild") public class QuickBuildRequest extends QueueBuildRequest { /** @@ -28,7 +28,7 @@ public class QuickBuildRequest extends QueueBuildRequest { /** * The URL(absolute or relative) of the source that needs to be built. For - * Docker build, it can be an URL to a tar or github repoistory as + * Docker build, it can be an URL to a tar or github repository as * supported by Docker. * If it is relative URL, the relative path should be obtained from calling * getSourceUploadUrl API. @@ -95,7 +95,7 @@ public QuickBuildRequest withImageNames(List imageNames) { } /** - * Get the URL(absolute or relative) of the source that needs to be built. For Docker build, it can be an URL to a tar or github repoistory as supported by Docker. + * Get the URL(absolute or relative) of the source that needs to be built. For Docker build, it can be an URL to a tar or github repository as supported by Docker. If it is relative URL, the relative path should be obtained from calling getSourceUploadUrl API. * * @return the sourceLocation value @@ -105,7 +105,7 @@ public String sourceLocation() { } /** - * Set the URL(absolute or relative) of the source that needs to be built. For Docker build, it can be an URL to a tar or github repoistory as supported by Docker. + * Set the URL(absolute or relative) of the source that needs to be built. For Docker build, it can be an URL to a tar or github repository as supported by Docker. If it is relative URL, the relative path should be obtained from calling getSourceUploadUrl API. * * @param sourceLocation the sourceLocation value to set diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/Registry.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/Registry.java index 11f8f5fa56c33..9148c906c5aac 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/Registry.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/Registry.java @@ -40,6 +40,11 @@ public interface Registry extends HasInner, Resource, GroupableRe */ String loginServer(); + /** + * @return the networkRuleSet value. + */ + NetworkRuleSet networkRuleSet(); + /** * @return the provisioningState value. */ @@ -106,6 +111,18 @@ interface WithAdminUserEnabled { WithCreate withAdminUserEnabled(Boolean adminUserEnabled); } + /** + * The stage of the registry definition allowing to specify NetworkRuleSet. + */ + interface WithNetworkRuleSet { + /** + * Specifies networkRuleSet. + * @param networkRuleSet The network rule set for a container registry + * @return the next definition stage + */ + WithCreate withNetworkRuleSet(NetworkRuleSet networkRuleSet); + } + /** * The stage of the registry definition allowing to specify StorageAccount. */ @@ -123,13 +140,13 @@ interface WithStorageAccount { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAdminUserEnabled, DefinitionStages.WithStorageAccount { + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAdminUserEnabled, DefinitionStages.WithNetworkRuleSet, DefinitionStages.WithStorageAccount { } } /** * The template for a Registry update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAdminUserEnabled, UpdateStages.WithSku, UpdateStages.WithStorageAccount { + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAdminUserEnabled, UpdateStages.WithNetworkRuleSet, UpdateStages.WithSku, UpdateStages.WithStorageAccount { } /** @@ -148,6 +165,18 @@ interface WithAdminUserEnabled { Update withAdminUserEnabled(Boolean adminUserEnabled); } + /** + * The stage of the registry update allowing to specify NetworkRuleSet. + */ + interface WithNetworkRuleSet { + /** + * Specifies networkRuleSet. + * @param networkRuleSet The network rule set for a container registry + * @return the next update stage + */ + Update withNetworkRuleSet(NetworkRuleSet networkRuleSet); + } + /** * The stage of the registry update allowing to specify Sku. */ diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/RegistryUpdateParameters.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/RegistryUpdateParameters.java index 4365c94c85db3..fe7c586d0efcd 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/RegistryUpdateParameters.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/RegistryUpdateParameters.java @@ -43,6 +43,12 @@ public class RegistryUpdateParameters { @JsonProperty(value = "properties.storageAccount") private StorageAccountProperties storageAccount; + /** + * The network rule set for a container registry. + */ + @JsonProperty(value = "properties.networkRuleSet") + private NetworkRuleSet networkRuleSet; + /** * Get the tags for the container registry. * @@ -123,4 +129,24 @@ public RegistryUpdateParameters withStorageAccount(StorageAccountProperties stor return this; } + /** + * Get the network rule set for a container registry. + * + * @return the networkRuleSet value + */ + public NetworkRuleSet networkRuleSet() { + return this.networkRuleSet; + } + + /** + * Set the network rule set for a container registry. + * + * @param networkRuleSet the networkRuleSet value to set + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withNetworkRuleSet(NetworkRuleSet networkRuleSet) { + this.networkRuleSet = networkRuleSet; + return this; + } + } diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/Target.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/Target.java index af0b61f4dbe19..dc801df962acc 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/Target.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/Target.java @@ -57,6 +57,18 @@ public class Target { @JsonProperty(value = "tag") private String tag; + /** + * The name of the artifact. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The version of the artifact. + */ + @JsonProperty(value = "version") + private String version; + /** * Get the MIME type of the referenced object. * @@ -197,4 +209,44 @@ public Target withTag(String tag) { return this; } + /** + * Get the name of the artifact. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the artifact. + * + * @param name the name value to set + * @return the Target object itself. + */ + public Target withName(String name) { + this.name = name; + return this; + } + + /** + * Get the version of the artifact. + * + * @return the version value + */ + public String version() { + return this.version; + } + + /** + * Set the version of the artifact. + * + * @param version the version value to set + * @return the Target object itself. + */ + public Target withVersion(String version) { + this.version = version; + return this; + } + } diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/VirtualNetworkRule.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/VirtualNetworkRule.java new file mode 100644 index 0000000000000..78056c58bf8e6 --- /dev/null +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/VirtualNetworkRule.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.v2018_02_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Virtual network rule. + */ +public class VirtualNetworkRule { + /** + * The action of virtual network rule. Possible values include: 'Allow'. + */ + @JsonProperty(value = "action") + private Action action; + + /** + * Resource ID of a subnet, for example: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + */ + @JsonProperty(value = "id", required = true) + private String virtualNetworkResourceId; + + /** + * Get the action of virtual network rule. Possible values include: 'Allow'. + * + * @return the action value + */ + public Action action() { + return this.action; + } + + /** + * Set the action of virtual network rule. Possible values include: 'Allow'. + * + * @param action the action value to set + * @return the VirtualNetworkRule object itself. + */ + public VirtualNetworkRule withAction(Action action) { + this.action = action; + return this; + } + + /** + * Get resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @return the virtualNetworkResourceId value + */ + public String virtualNetworkResourceId() { + return this.virtualNetworkResourceId; + } + + /** + * Set resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @param virtualNetworkResourceId the virtualNetworkResourceId value to set + * @return the VirtualNetworkRule object itself. + */ + public VirtualNetworkRule withVirtualNetworkResourceId(String virtualNetworkResourceId) { + this.virtualNetworkResourceId = virtualNetworkResourceId; + return this; + } + +} diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/WebhookAction.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/WebhookAction.java index 6674ddb712067..0d621980b6005 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/WebhookAction.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/WebhookAction.java @@ -25,6 +25,12 @@ public final class WebhookAction extends ExpandableStringEnum { /** Static value quarantine for WebhookAction. */ public static final WebhookAction QUARANTINE = fromString("quarantine"); + /** Static value chart_push for WebhookAction. */ + public static final WebhookAction CHART_PUSH = fromString("chart_push"); + + /** Static value chart_delete for WebhookAction. */ + public static final WebhookAction CHART_DELETE = fromString("chart_delete"); + /** * Creates or finds a WebhookAction from its string representation. * @param name a name to look for diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildStepsImpl.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildStepsImpl.java index fb77d60a02b4f..aa37de9f2f762 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildStepsImpl.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildStepsImpl.java @@ -83,10 +83,14 @@ public BuildStep call(BuildStepInner inner) { public Observable getAsync(String resourceGroupName, String registryName, String buildTaskName, String stepName) { BuildStepsInner client = this.inner(); return client.getAsync(resourceGroupName, registryName, buildTaskName, stepName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public BuildStep call(BuildStepInner inner) { - return wrapModel(inner); + public Observable call(BuildStepInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((BuildStep)wrapModel(inner)); + } } }); } diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildTasksImpl.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildTasksImpl.java index 312dae91b16a0..de851c271754c 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildTasksImpl.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildTasksImpl.java @@ -77,10 +77,14 @@ public BuildTask call(BuildTaskInner inner) { public Observable getAsync(String resourceGroupName, String registryName, String buildTaskName) { BuildTasksInner client = this.inner(); return client.getAsync(resourceGroupName, registryName, buildTaskName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public BuildTask call(BuildTaskInner inner) { - return wrapModel(inner); + public Observable call(BuildTaskInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((BuildTask)wrapModel(inner)); + } } }); } diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildsImpl.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildsImpl.java index f99df7ca3a7f2..c7f7c6cfa5a00 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildsImpl.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildsImpl.java @@ -74,10 +74,14 @@ public Build call(BuildInner inner) { public Observable getAsync(String resourceGroupName, String registryName, String buildId) { BuildsInner client = this.inner(); return client.getAsync(resourceGroupName, registryName, buildId) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public Build call(BuildInner inner) { - return wrapModel(inner); + public Observable call(BuildInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Build)wrapModel(inner)); + } } }); } diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/RegistryImpl.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/RegistryImpl.java index 74b0ff4737e3d..62098ffa445c0 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/RegistryImpl.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/RegistryImpl.java @@ -17,6 +17,7 @@ import com.microsoft.azure.management.containerregistry.v2018_02_01_preview.ProvisioningState; import com.microsoft.azure.management.containerregistry.v2018_02_01_preview.Status; import com.microsoft.azure.management.containerregistry.v2018_02_01_preview.StorageAccountProperties; +import com.microsoft.azure.management.containerregistry.v2018_02_01_preview.NetworkRuleSet; import rx.functions.Func1; class RegistryImpl extends GroupableResourceCoreImpl implements Registry, Registry.Definition, Registry.Update { @@ -84,6 +85,11 @@ public String loginServer() { return this.inner().loginServer(); } + @Override + public NetworkRuleSet networkRuleSet() { + return this.inner().networkRuleSet(); + } + @Override public ProvisioningState provisioningState() { return this.inner().provisioningState(); @@ -124,6 +130,16 @@ public RegistryImpl withAdminUserEnabled(Boolean adminUserEnabled) { return this; } + @Override + public RegistryImpl withNetworkRuleSet(NetworkRuleSet networkRuleSet) { + if (isInCreateMode()) { + this.inner().withNetworkRuleSet(networkRuleSet); + } else { + this.updateParameter.withNetworkRuleSet(networkRuleSet); + } + return this; + } + @Override public RegistryImpl withStorageAccount(StorageAccountProperties storageAccount) { if (isInCreateMode()) { diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/RegistryInner.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/RegistryInner.java index ebfd71e2d02c1..095a323c8a849 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/RegistryInner.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/RegistryInner.java @@ -13,6 +13,7 @@ import com.microsoft.azure.management.containerregistry.v2018_02_01_preview.ProvisioningState; import com.microsoft.azure.management.containerregistry.v2018_02_01_preview.Status; import com.microsoft.azure.management.containerregistry.v2018_02_01_preview.StorageAccountProperties; +import com.microsoft.azure.management.containerregistry.v2018_02_01_preview.NetworkRuleSet; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.Resource; @@ -68,6 +69,12 @@ public class RegistryInner extends Resource { @JsonProperty(value = "properties.storageAccount") private StorageAccountProperties storageAccount; + /** + * The network rule set for a container registry. + */ + @JsonProperty(value = "properties.networkRuleSet") + private NetworkRuleSet networkRuleSet; + /** * Get the SKU of the container registry. * @@ -164,4 +171,24 @@ public RegistryInner withStorageAccount(StorageAccountProperties storageAccount) return this; } + /** + * Get the network rule set for a container registry. + * + * @return the networkRuleSet value + */ + public NetworkRuleSet networkRuleSet() { + return this.networkRuleSet; + } + + /** + * Set the network rule set for a container registry. + * + * @param networkRuleSet the networkRuleSet value to set + * @return the RegistryInner object itself. + */ + public RegistryInner withNetworkRuleSet(NetworkRuleSet networkRuleSet) { + this.networkRuleSet = networkRuleSet; + return this; + } + } diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/ReplicationsImpl.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/ReplicationsImpl.java index 922168386d38f..47a722081579a 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/ReplicationsImpl.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/ReplicationsImpl.java @@ -64,10 +64,14 @@ public Replication call(ReplicationInner inner) { public Observable getAsync(String resourceGroupName, String registryName, String replicationName) { ReplicationsInner client = this.inner(); return client.getAsync(resourceGroupName, registryName, replicationName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public Replication call(ReplicationInner inner) { - return wrapModel(inner); + public Observable call(ReplicationInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Replication)wrapModel(inner)); + } } }); } diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/SourceRepositoryPropertiesInner.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/SourceRepositoryPropertiesInner.java index 21ebd29b678e1..98d8bf121738d 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/SourceRepositoryPropertiesInner.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/SourceRepositoryPropertiesInner.java @@ -24,7 +24,7 @@ public class SourceRepositoryPropertiesInner { private SourceControlType sourceControlType; /** - * The full URL to the source code respository. + * The full URL to the source code repository. */ @JsonProperty(value = "repositoryUrl", required = true) private String repositoryUrl; @@ -63,7 +63,7 @@ public SourceRepositoryPropertiesInner withSourceControlType(SourceControlType s } /** - * Get the full URL to the source code respository. + * Get the full URL to the source code repository. * * @return the repositoryUrl value */ @@ -72,7 +72,7 @@ public String repositoryUrl() { } /** - * Set the full URL to the source code respository. + * Set the full URL to the source code repository. * * @param repositoryUrl the repositoryUrl value to set * @return the SourceRepositoryPropertiesInner object itself. diff --git a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/WebhooksImpl.java b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/WebhooksImpl.java index 7c557110626ff..642997af66d68 100644 --- a/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/WebhooksImpl.java +++ b/sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/WebhooksImpl.java @@ -109,10 +109,14 @@ public Webhook call(WebhookInner inner) { public Observable getAsync(String resourceGroupName, String registryName, String webhookName) { WebhooksInner client = this.inner(); return client.getAsync(resourceGroupName, registryName, webhookName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public Webhook call(WebhookInner inner) { - return wrapModel(inner); + public Observable call(WebhookInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Webhook)wrapModel(inner)); + } } }); }