From c795a23700227ea3abdd80b3770d8cd42f180635 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 20 Nov 2018 02:47:31 +0000 Subject: [PATCH 1/4] Generated from 404ce04b1a1c4cac92a67328f319a021f320935a Add empty resource group name validation, minor cleanup --- .../v2017_06_01_preview/Target.java | 6 +-- .../v2018_09_01/implementation/RunInner.java | 52 +++++++++---------- .../v2018_09_01/implementation/TaskInner.java | 2 +- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/containerregistry/resource-manager/v2017_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2017_06_01_preview/Target.java b/containerregistry/resource-manager/v2017_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2017_06_01_preview/Target.java index c3a24974a135..c14b7193d590 100644 --- a/containerregistry/resource-manager/v2017_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2017_06_01_preview/Target.java +++ b/containerregistry/resource-manager/v2017_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2017_06_01_preview/Target.java @@ -28,7 +28,7 @@ public class Target { /** * The digest of the content, as defined by the Registry V2 HTTP API - * Specificiation. + * Specification. */ @JsonProperty(value = "digest") private String digest; @@ -98,7 +98,7 @@ public Target withSize(Long size) { } /** - * Get the digest of the content, as defined by the Registry V2 HTTP API Specificiation. + * Get the digest of the content, as defined by the Registry V2 HTTP API Specification. * * @return the digest value */ @@ -107,7 +107,7 @@ public String digest() { } /** - * Set the digest of the content, as defined by the Registry V2 HTTP API Specificiation. + * Set the digest of the content, as defined by the Registry V2 HTTP API Specification. * * @param digest the digest value to set * @return the Target object itself. diff --git a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RunInner.java b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RunInner.java index e892261af122..3c36bbcc5865 100644 --- a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RunInner.java +++ b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RunInner.java @@ -98,12 +98,6 @@ public class RunInner extends ProxyResource { @JsonProperty(value = "properties.sourceTrigger") private SourceTriggerDescriptor sourceTrigger; - /** - * The value that indicates whether archiving is enabled or not. - */ - @JsonProperty(value = "properties.isArchiveEnabled") - private Boolean isArchiveEnabled; - /** * The platform properties against which the run will happen. */ @@ -123,6 +117,12 @@ public class RunInner extends ProxyResource { @JsonProperty(value = "properties.provisioningState") private ProvisioningState provisioningState; + /** + * The value that indicates whether archiving is enabled or not. + */ + @JsonProperty(value = "properties.isArchiveEnabled") + private Boolean isArchiveEnabled; + /** * Get the unique identifier for the run. * @@ -343,26 +343,6 @@ public RunInner withSourceTrigger(SourceTriggerDescriptor sourceTrigger) { return this; } - /** - * Get the value that indicates whether archiving is enabled or not. - * - * @return the isArchiveEnabled value - */ - public Boolean isArchiveEnabled() { - return this.isArchiveEnabled; - } - - /** - * Set the value that indicates whether archiving is enabled or not. - * - * @param isArchiveEnabled the isArchiveEnabled value to set - * @return the RunInner object itself. - */ - public RunInner withIsArchiveEnabled(Boolean isArchiveEnabled) { - this.isArchiveEnabled = isArchiveEnabled; - return this; - } - /** * Get the platform properties against which the run will happen. * @@ -423,4 +403,24 @@ public RunInner withProvisioningState(ProvisioningState provisioningState) { return this; } + /** + * Get the value that indicates whether archiving is enabled or not. + * + * @return the isArchiveEnabled value + */ + public Boolean isArchiveEnabled() { + return this.isArchiveEnabled; + } + + /** + * Set the value that indicates whether archiving is enabled or not. + * + * @param isArchiveEnabled the isArchiveEnabled value to set + * @return the RunInner object itself. + */ + public RunInner withIsArchiveEnabled(Boolean isArchiveEnabled) { + this.isArchiveEnabled = isArchiveEnabled; + return this; + } + } diff --git a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/TaskInner.java b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/TaskInner.java index a8ed57f81df9..d0afcc59deec 100644 --- a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/TaskInner.java +++ b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/TaskInner.java @@ -21,7 +21,7 @@ /** * The task that has the ARM resource and task properties. - * The task will have all information to schedule a run against it. + * The task will have all information to schedule a run against it. */ @JsonFlatten public class TaskInner extends Resource { From b60107730912b16ffe2eb4c9680d8359dda59f00 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 21 Nov 2018 23:58:13 +0000 Subject: [PATCH 2/4] Generated from 4acb1b6d259fdd431a87a4d4f3ce25458432078c Fix network rule set default value --- .../v2017_10_01/DefaultAction.java | 41 +++++++++++ .../v2017_10_01/NetworkRuleSet.java | 71 +++++++++++++++++++ .../v2017_10_01/Registry.java | 33 ++++++++- .../v2017_10_01/RegistryUpdateParameters.java | 26 +++++++ .../v2017_10_01/VirtualNetworkRule.java | 44 ++++++++++++ .../implementation/RegistryImpl.java | 16 +++++ .../implementation/RegistryInner.java | 27 +++++++ .../v2018_02_01_preview/DefaultAction.java | 41 +++++++++++ .../v2018_02_01_preview/NetworkRuleSet.java | 71 +++++++++++++++++++ .../v2018_02_01_preview/Registry.java | 33 ++++++++- .../RegistryUpdateParameters.java | 26 +++++++ .../VirtualNetworkRule.java | 44 ++++++++++++ .../implementation/RegistryImpl.java | 16 +++++ .../implementation/RegistryInner.java | 27 +++++++ .../v2018_09_01/DefaultAction.java | 41 +++++++++++ .../v2018_09_01/NetworkRuleSet.java | 71 +++++++++++++++++++ .../v2018_09_01/Registry.java | 33 ++++++++- .../v2018_09_01/RegistryUpdateParameters.java | 26 +++++++ .../v2018_09_01/VirtualNetworkRule.java | 44 ++++++++++++ .../implementation/RegistryImpl.java | 16 +++++ .../implementation/RegistryInner.java | 27 +++++++ 21 files changed, 768 insertions(+), 6 deletions(-) create mode 100644 containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/DefaultAction.java create mode 100644 containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/NetworkRuleSet.java create mode 100644 containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/VirtualNetworkRule.java create mode 100644 containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/DefaultAction.java create mode 100644 containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/NetworkRuleSet.java create mode 100644 containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/VirtualNetworkRule.java create mode 100644 containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/DefaultAction.java create mode 100644 containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/NetworkRuleSet.java create mode 100644 containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/VirtualNetworkRule.java diff --git a/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/DefaultAction.java b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/DefaultAction.java new file mode 100644 index 000000000000..f8b94e373f7d --- /dev/null +++ b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/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.v2017_10_01; + +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/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/NetworkRuleSet.java b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/NetworkRuleSet.java new file mode 100644 index 000000000000..96480d68c6c8 --- /dev/null +++ b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/NetworkRuleSet.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.v2017_10_01; + +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") + private DefaultAction defaultAction; + + /** + * The virtual network rules. + */ + @JsonProperty(value = "virtualNetworkRules") + private List virtualNetworkRules; + + /** + * 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; + } + +} diff --git a/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/Registry.java b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/Registry.java index 566b512b6fe6..0fe4f321e1a4 100644 --- a/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/Registry.java +++ b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/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/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/RegistryUpdateParameters.java b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/RegistryUpdateParameters.java index 12dd3899d44b..82a2fbccc2cc 100644 --- a/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/RegistryUpdateParameters.java +++ b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/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/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/VirtualNetworkRule.java b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/VirtualNetworkRule.java new file mode 100644 index 000000000000..c119ee03ee48 --- /dev/null +++ b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/VirtualNetworkRule.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.v2017_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The virtual network rule for a container registry. + */ +public class VirtualNetworkRule { + /** + * Resource ID of a subnet, for example: + * /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @param id the id value to set + * @return the VirtualNetworkRule object itself. + */ + public VirtualNetworkRule withId(String id) { + this.id = id; + return this; + } + +} diff --git a/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/implementation/RegistryImpl.java b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/implementation/RegistryImpl.java index f8fbda520871..d4bae027bc4b 100644 --- a/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/implementation/RegistryImpl.java +++ b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/implementation/RegistryImpl.java @@ -17,6 +17,7 @@ import com.microsoft.azure.management.containerregistry.v2017_10_01.ProvisioningState; import com.microsoft.azure.management.containerregistry.v2017_10_01.Status; import com.microsoft.azure.management.containerregistry.v2017_10_01.StorageAccountProperties; +import com.microsoft.azure.management.containerregistry.v2017_10_01.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/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/implementation/RegistryInner.java b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/implementation/RegistryInner.java index 65021b6d8347..eef5e6c53382 100644 --- a/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/implementation/RegistryInner.java +++ b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/implementation/RegistryInner.java @@ -13,6 +13,7 @@ import com.microsoft.azure.management.containerregistry.v2017_10_01.ProvisioningState; import com.microsoft.azure.management.containerregistry.v2017_10_01.Status; import com.microsoft.azure.management.containerregistry.v2017_10_01.StorageAccountProperties; +import com.microsoft.azure.management.containerregistry.v2017_10_01.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/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/DefaultAction.java b/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/DefaultAction.java new file mode 100644 index 000000000000..fe0b8fec4d8f --- /dev/null +++ b/containerregistry/resource-manager/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/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/NetworkRuleSet.java b/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/NetworkRuleSet.java new file mode 100644 index 000000000000..4c01acbb7ff9 --- /dev/null +++ b/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/NetworkRuleSet.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.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") + private DefaultAction defaultAction; + + /** + * The virtual network rules. + */ + @JsonProperty(value = "virtualNetworkRules") + private List virtualNetworkRules; + + /** + * 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; + } + +} diff --git a/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/Registry.java b/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/Registry.java index 11f8f5fa56c3..9148c906c5aa 100644 --- a/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/Registry.java +++ b/containerregistry/resource-manager/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/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/RegistryUpdateParameters.java b/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/RegistryUpdateParameters.java index 4365c94c85db..fe7c586d0efc 100644 --- a/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/RegistryUpdateParameters.java +++ b/containerregistry/resource-manager/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/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/VirtualNetworkRule.java b/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/VirtualNetworkRule.java new file mode 100644 index 000000000000..737cc0203c2a --- /dev/null +++ b/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/VirtualNetworkRule.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.v2018_02_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The virtual network rule for a container registry. + */ +public class VirtualNetworkRule { + /** + * Resource ID of a subnet, for example: + * /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @param id the id value to set + * @return the VirtualNetworkRule object itself. + */ + public VirtualNetworkRule withId(String id) { + this.id = id; + return this; + } + +} diff --git a/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/RegistryImpl.java b/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/RegistryImpl.java index 74b0ff4737e3..62098ffa445c 100644 --- a/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/RegistryImpl.java +++ b/containerregistry/resource-manager/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/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/RegistryInner.java b/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/RegistryInner.java index ebfd71e2d02c..095a323c8a84 100644 --- a/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/RegistryInner.java +++ b/containerregistry/resource-manager/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/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/DefaultAction.java b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/DefaultAction.java new file mode 100644 index 000000000000..f7a000a02873 --- /dev/null +++ b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/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_09_01; + +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/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/NetworkRuleSet.java b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/NetworkRuleSet.java new file mode 100644 index 000000000000..09ea1a5c9320 --- /dev/null +++ b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/NetworkRuleSet.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.v2018_09_01; + +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") + private DefaultAction defaultAction; + + /** + * The virtual network rules. + */ + @JsonProperty(value = "virtualNetworkRules") + private List virtualNetworkRules; + + /** + * 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; + } + +} diff --git a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/Registry.java b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/Registry.java index b0e249cf5ddf..cc5da3ffa3e4 100644 --- a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/Registry.java +++ b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/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/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/RegistryUpdateParameters.java b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/RegistryUpdateParameters.java index 97ddffade247..9e42bf8f7199 100644 --- a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/RegistryUpdateParameters.java +++ b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/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/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/VirtualNetworkRule.java b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/VirtualNetworkRule.java new file mode 100644 index 000000000000..1890debb1289 --- /dev/null +++ b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/VirtualNetworkRule.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.v2018_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The virtual network rule for a container registry. + */ +public class VirtualNetworkRule { + /** + * Resource ID of a subnet, for example: + * /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @param id the id value to set + * @return the VirtualNetworkRule object itself. + */ + public VirtualNetworkRule withId(String id) { + this.id = id; + return this; + } + +} diff --git a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RegistryImpl.java b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RegistryImpl.java index 83691c502116..54f62869737e 100644 --- a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RegistryImpl.java +++ b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RegistryImpl.java @@ -17,6 +17,7 @@ import com.microsoft.azure.management.containerregistry.v2018_09_01.ProvisioningState; import com.microsoft.azure.management.containerregistry.v2018_09_01.Status; import com.microsoft.azure.management.containerregistry.v2018_09_01.StorageAccountProperties; +import com.microsoft.azure.management.containerregistry.v2018_09_01.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/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RegistryInner.java b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RegistryInner.java index 8ff0a1cbef07..376a284615be 100644 --- a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RegistryInner.java +++ b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RegistryInner.java @@ -13,6 +13,7 @@ import com.microsoft.azure.management.containerregistry.v2018_09_01.ProvisioningState; import com.microsoft.azure.management.containerregistry.v2018_09_01.Status; import com.microsoft.azure.management.containerregistry.v2018_09_01.StorageAccountProperties; +import com.microsoft.azure.management.containerregistry.v2018_09_01.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; + } + } From 086d1bd002973720c9538a4fda517ef8a51f0c33 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 26 Nov 2018 19:45:43 +0000 Subject: [PATCH 3/4] Generated from 43b818a4578f6fa9b0237aad66b14d896ff6a614 Fix resource group name --- .../containerregistry/v2017_10_01/VirtualNetworkRule.java | 6 +++--- .../v2018_02_01_preview/VirtualNetworkRule.java | 6 +++--- .../containerregistry/v2018_09_01/VirtualNetworkRule.java | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/VirtualNetworkRule.java b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/VirtualNetworkRule.java index c119ee03ee48..9a700be1eb29 100644 --- a/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/VirtualNetworkRule.java +++ b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/VirtualNetworkRule.java @@ -16,13 +16,13 @@ public class VirtualNetworkRule { /** * Resource ID of a subnet, for example: - * /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. */ @JsonProperty(value = "id") private String id; /** - * Get resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * Get resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. * * @return the id value */ @@ -31,7 +31,7 @@ public String id() { } /** - * Set resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * Set resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. * * @param id the id value to set * @return the VirtualNetworkRule object itself. diff --git a/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/VirtualNetworkRule.java b/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/VirtualNetworkRule.java index 737cc0203c2a..08acacb0ffe5 100644 --- a/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/VirtualNetworkRule.java +++ b/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/VirtualNetworkRule.java @@ -16,13 +16,13 @@ public class VirtualNetworkRule { /** * Resource ID of a subnet, for example: - * /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. */ @JsonProperty(value = "id") private String id; /** - * Get resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * Get resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. * * @return the id value */ @@ -31,7 +31,7 @@ public String id() { } /** - * Set resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * Set resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. * * @param id the id value to set * @return the VirtualNetworkRule object itself. diff --git a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/VirtualNetworkRule.java b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/VirtualNetworkRule.java index 1890debb1289..e06f4f2cc1f3 100644 --- a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/VirtualNetworkRule.java +++ b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/VirtualNetworkRule.java @@ -16,13 +16,13 @@ public class VirtualNetworkRule { /** * Resource ID of a subnet, for example: - * /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. */ @JsonProperty(value = "id") private String id; /** - * Get resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * Get resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. * * @return the id value */ @@ -31,7 +31,7 @@ public String id() { } /** - * Set resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * Set resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. * * @param id the id value to set * @return the VirtualNetworkRule object itself. From 56bd7183743975d7e0ef2a67473d30fd92da2bfb Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 26 Nov 2018 21:25:44 +0000 Subject: [PATCH 4/4] Generated from 3e12549e66336e4ca6fa81b49aaf9ed7d2797cce Add network rule set properties, empty resource group validation --- .../v2017_10_01/NetworkRuleSet.java | 2 +- .../v2017_10_01/VirtualNetworkRule.java | 2 +- .../v2018_02_01_preview/NetworkRuleSet.java | 2 +- .../VirtualNetworkRule.java | 2 +- .../v2018_09_01/NetworkRuleSet.java | 2 +- .../v2018_09_01/VirtualNetworkRule.java | 2 +- .../v2018_09_01/implementation/RunInner.java | 52 +++++++++---------- 7 files changed, 32 insertions(+), 32 deletions(-) diff --git a/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/NetworkRuleSet.java b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/NetworkRuleSet.java index 96480d68c6c8..74aa54d18894 100644 --- a/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/NetworkRuleSet.java +++ b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/NetworkRuleSet.java @@ -19,7 +19,7 @@ public class NetworkRuleSet { * The default action of allow or deny when no other rules match. Possible * values include: 'Allow', 'Deny'. */ - @JsonProperty(value = "defaultAction") + @JsonProperty(value = "defaultAction", required = true) private DefaultAction defaultAction; /** diff --git a/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/VirtualNetworkRule.java b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/VirtualNetworkRule.java index 9a700be1eb29..2fbac6080fde 100644 --- a/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/VirtualNetworkRule.java +++ b/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/VirtualNetworkRule.java @@ -18,7 +18,7 @@ public class VirtualNetworkRule { * Resource ID of a subnet, for example: * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. */ - @JsonProperty(value = "id") + @JsonProperty(value = "id", required = true) private String id; /** diff --git a/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/NetworkRuleSet.java b/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/NetworkRuleSet.java index 4c01acbb7ff9..a1b2e003f2ba 100644 --- a/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/NetworkRuleSet.java +++ b/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/NetworkRuleSet.java @@ -19,7 +19,7 @@ public class NetworkRuleSet { * The default action of allow or deny when no other rules match. Possible * values include: 'Allow', 'Deny'. */ - @JsonProperty(value = "defaultAction") + @JsonProperty(value = "defaultAction", required = true) private DefaultAction defaultAction; /** diff --git a/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/VirtualNetworkRule.java b/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/VirtualNetworkRule.java index 08acacb0ffe5..6b7d52d6843d 100644 --- a/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/VirtualNetworkRule.java +++ b/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/VirtualNetworkRule.java @@ -18,7 +18,7 @@ public class VirtualNetworkRule { * Resource ID of a subnet, for example: * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. */ - @JsonProperty(value = "id") + @JsonProperty(value = "id", required = true) private String id; /** diff --git a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/NetworkRuleSet.java b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/NetworkRuleSet.java index 09ea1a5c9320..c1209884c471 100644 --- a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/NetworkRuleSet.java +++ b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/NetworkRuleSet.java @@ -19,7 +19,7 @@ public class NetworkRuleSet { * The default action of allow or deny when no other rules match. Possible * values include: 'Allow', 'Deny'. */ - @JsonProperty(value = "defaultAction") + @JsonProperty(value = "defaultAction", required = true) private DefaultAction defaultAction; /** diff --git a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/VirtualNetworkRule.java b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/VirtualNetworkRule.java index e06f4f2cc1f3..69f5a075b791 100644 --- a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/VirtualNetworkRule.java +++ b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/VirtualNetworkRule.java @@ -18,7 +18,7 @@ public class VirtualNetworkRule { * Resource ID of a subnet, for example: * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. */ - @JsonProperty(value = "id") + @JsonProperty(value = "id", required = true) private String id; /** diff --git a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RunInner.java b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RunInner.java index 3c36bbcc5865..e892261af122 100644 --- a/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RunInner.java +++ b/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RunInner.java @@ -98,6 +98,12 @@ public class RunInner extends ProxyResource { @JsonProperty(value = "properties.sourceTrigger") private SourceTriggerDescriptor sourceTrigger; + /** + * The value that indicates whether archiving is enabled or not. + */ + @JsonProperty(value = "properties.isArchiveEnabled") + private Boolean isArchiveEnabled; + /** * The platform properties against which the run will happen. */ @@ -117,12 +123,6 @@ public class RunInner extends ProxyResource { @JsonProperty(value = "properties.provisioningState") private ProvisioningState provisioningState; - /** - * The value that indicates whether archiving is enabled or not. - */ - @JsonProperty(value = "properties.isArchiveEnabled") - private Boolean isArchiveEnabled; - /** * Get the unique identifier for the run. * @@ -343,6 +343,26 @@ public RunInner withSourceTrigger(SourceTriggerDescriptor sourceTrigger) { return this; } + /** + * Get the value that indicates whether archiving is enabled or not. + * + * @return the isArchiveEnabled value + */ + public Boolean isArchiveEnabled() { + return this.isArchiveEnabled; + } + + /** + * Set the value that indicates whether archiving is enabled or not. + * + * @param isArchiveEnabled the isArchiveEnabled value to set + * @return the RunInner object itself. + */ + public RunInner withIsArchiveEnabled(Boolean isArchiveEnabled) { + this.isArchiveEnabled = isArchiveEnabled; + return this; + } + /** * Get the platform properties against which the run will happen. * @@ -403,24 +423,4 @@ public RunInner withProvisioningState(ProvisioningState provisioningState) { return this; } - /** - * Get the value that indicates whether archiving is enabled or not. - * - * @return the isArchiveEnabled value - */ - public Boolean isArchiveEnabled() { - return this.isArchiveEnabled; - } - - /** - * Set the value that indicates whether archiving is enabled or not. - * - * @param isArchiveEnabled the isArchiveEnabled value to set - * @return the RunInner object itself. - */ - public RunInner withIsArchiveEnabled(Boolean isArchiveEnabled) { - this.isArchiveEnabled = isArchiveEnabled; - return this; - } - }