From c0c7f96aabc564ca04ca60bfb1af9daaefdc277f Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 26 May 2021 07:41:00 +0000 Subject: [PATCH] CodeGen from PR 14550 in Azure/azure-rest-api-specs Remove x-ms-flatten setting for resource properties (#14550) * Disabled flatten setting for properties * added forceDelete parameter for orchestrator resource * remove forcedelete * config Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> --- .../CHANGELOG.md | 3 +- .../README.md | 4 +- .../pom.xml | 141 ++++++----- .../DelegatedNetworkManager.java | 1 + .../models/DelegatedControllerInner.java | 84 +------ .../fluent/models/DelegatedSubnetInner.java | 93 ++------ .../fluent/models/OrchestratorInner.java | 199 ++-------------- .../DelegatedControllerImpl.java | 22 +- .../implementation/DelegatedSubnetImpl.java | 29 +-- .../implementation/OrchestratorImpl.java | 64 +---- .../models/DelegatedController.java | 34 +-- .../models/DelegatedControllerProperties.java | 100 ++++++++ .../models/DelegatedSubnet.java | 52 +--- .../models/DelegatedSubnetProperties.java | 112 +++++++++ .../models/ErrorAdditionalInfo.java | 54 ----- .../delegatednetwork/models/Orchestrator.java | 130 +--------- .../OrchestratorResourceProperties.java | 224 ++++++++++++++++++ 17 files changed, 598 insertions(+), 748 deletions(-) create mode 100644 sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/DelegatedControllerProperties.java create mode 100644 sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/DelegatedSubnetProperties.java delete mode 100644 sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/ErrorAdditionalInfo.java create mode 100644 sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/OrchestratorResourceProperties.java diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/CHANGELOG.md b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/CHANGELOG.md index c98aaabefa15c..9aea42fcbd765 100644 --- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/CHANGELOG.md +++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2021-05-26) +- Azure Resource Manager DelegatedNetwork client library for Java. This package contains Microsoft Azure SDK for DelegatedNetwork Management SDK. DNC web api provides way to create, get and delete dnc controller. Package tag package-2021-03-15. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.1 (2021-03-26) diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md index a1475ce1fff46..7abee8a06de56 100644 --- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md +++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-delegatednetwork - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -74,6 +74,8 @@ See [API design][design] for general introduction on design and key concepts on ## Examples + + ## Troubleshooting ## Next steps diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/pom.xml b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/pom.xml index 1d124607ed093..f3d359e4d853f 100644 --- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/pom.xml +++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/pom.xml @@ -1,67 +1,86 @@ - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + - com.azure.resourcemanager - azure-resourcemanager-delegatednetwork - 1.0.0-beta.2 - jar + com.azure.resourcemanager + azure-resourcemanager-delegatednetwork + 1.0.0-beta.2 + jar - Microsoft Azure SDK for DelegatedNetwork Management - This package contains Microsoft Azure SDK for DelegatedNetwork Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. DNC web api provides way to create, get and delete dnc controller. Package tag package-2021-03-15. - https://github.com/Azure/azure-sdk-for-java + Microsoft Azure SDK for DelegatedNetwork Management + This package contains Microsoft Azure SDK for DelegatedNetwork Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. DNC web api provides way to create, get and delete dnc controller. Package tag package-2021-03-15. + https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + - - https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - microsoft - Microsoft - - - - UTF-8 - - - - - com.azure - azure-core - 1.16.0 - - - com.azure - azure-core-management - 1.2.2 - - - - - - org.jacoco - jacoco-maven-plugin - 0.8.5 - - true - - - - + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + + + + + com.azure + azure-core + 1.16.0 + + + com.azure + azure-core-management + 1.2.2 + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.5 + + true + + + + org.revapi + revapi-maven-plugin + 0.11.2 + + + + + java.method.addedToInterface + + + true + .* + com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)* + + + + + + + diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/DelegatedNetworkManager.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/DelegatedNetworkManager.java index 11a2ce3389f29..e1def316e099d 100644 --- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/DelegatedNetworkManager.java +++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/DelegatedNetworkManager.java @@ -201,6 +201,7 @@ public DelegatedNetworkManager authenticate(TokenCredential credential, AzurePro .add( new BearerTokenAuthenticationPolicy( credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); + policies.addAll(this.policies); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedControllerInner.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedControllerInner.java index 0caf85444ff84..f487fca4d89f1 100644 --- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedControllerInner.java +++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedControllerInner.java @@ -5,94 +5,31 @@ package com.azure.resourcemanager.delegatednetwork.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.delegatednetwork.models.ControllerResource; -import com.azure.resourcemanager.delegatednetwork.models.ControllerState; +import com.azure.resourcemanager.delegatednetwork.models.DelegatedControllerProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Represents an instance of a DNC controller. */ -@JsonFlatten @Immutable -public class DelegatedControllerInner extends ControllerResource { +public final class DelegatedControllerInner extends ControllerResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(DelegatedControllerInner.class); /* - * Resource guid. + * Properties of the provision operation request. */ - @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) - private String resourceGuid; - - /* - * The current state of dnc controller resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ControllerState provisioningState; - - /* - * dnc application id should be used by customer to authenticate with dnc - * gateway. - */ - @JsonProperty(value = "properties.dncAppId", access = JsonProperty.Access.WRITE_ONLY) - private String dncAppId; - - /* - * tenant id of dnc application id - */ - @JsonProperty(value = "properties.dncTenantId", access = JsonProperty.Access.WRITE_ONLY) - private String dncTenantId; - - /* - * dnc endpoint url that customers can use to connect to - */ - @JsonProperty(value = "properties.dncEndpoint", access = JsonProperty.Access.WRITE_ONLY) - private String dncEndpoint; - - /** - * Get the resourceGuid property: Resource guid. - * - * @return the resourceGuid value. - */ - public String resourceGuid() { - return this.resourceGuid; - } - - /** - * Get the provisioningState property: The current state of dnc controller resource. - * - * @return the provisioningState value. - */ - public ControllerState provisioningState() { - return this.provisioningState; - } - - /** - * Get the dncAppId property: dnc application id should be used by customer to authenticate with dnc gateway. - * - * @return the dncAppId value. - */ - public String dncAppId() { - return this.dncAppId; - } - - /** - * Get the dncTenantId property: tenant id of dnc application id. - * - * @return the dncTenantId value. - */ - public String dncTenantId() { - return this.dncTenantId; - } + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private DelegatedControllerProperties properties; /** - * Get the dncEndpoint property: dnc endpoint url that customers can use to connect to. + * Get the properties property: Properties of the provision operation request. * - * @return the dncEndpoint value. + * @return the properties value. */ - public String dncEndpoint() { - return this.dncEndpoint; + public DelegatedControllerProperties properties() { + return this.properties; } /** {@inheritDoc} */ @@ -117,5 +54,8 @@ public DelegatedControllerInner withTags(Map tags) { @Override public void validate() { super.validate(); + if (properties() != null) { + properties().validate(); + } } } diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedSubnetInner.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedSubnetInner.java index f1d158e5da6d4..8a0c4d2bd686d 100644 --- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedSubnetInner.java +++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedSubnetInner.java @@ -5,101 +5,41 @@ package com.azure.resourcemanager.delegatednetwork.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.delegatednetwork.models.ControllerDetails; +import com.azure.resourcemanager.delegatednetwork.models.DelegatedSubnetProperties; import com.azure.resourcemanager.delegatednetwork.models.DelegatedSubnetResource; -import com.azure.resourcemanager.delegatednetwork.models.DelegatedSubnetState; -import com.azure.resourcemanager.delegatednetwork.models.SubnetDetails; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Represents an instance of a orchestrator. */ -@JsonFlatten @Fluent -public class DelegatedSubnetInner extends DelegatedSubnetResource { +public final class DelegatedSubnetInner extends DelegatedSubnetResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(DelegatedSubnetInner.class); /* - * Resource guid. + * Properties of the provision operation request. */ - @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) - private String resourceGuid; - - /* - * The current state of dnc delegated subnet resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private DelegatedSubnetState provisioningState; - - /* - * subnet details - */ - @JsonProperty(value = "properties.subnetDetails") - private SubnetDetails subnetDetails; - - /* - * Properties of the controller. - */ - @JsonProperty(value = "properties.controllerDetails") - private ControllerDetails controllerDetails; - - /** - * Get the resourceGuid property: Resource guid. - * - * @return the resourceGuid value. - */ - public String resourceGuid() { - return this.resourceGuid; - } - - /** - * Get the provisioningState property: The current state of dnc delegated subnet resource. - * - * @return the provisioningState value. - */ - public DelegatedSubnetState provisioningState() { - return this.provisioningState; - } - - /** - * Get the subnetDetails property: subnet details. - * - * @return the subnetDetails value. - */ - public SubnetDetails subnetDetails() { - return this.subnetDetails; - } + @JsonProperty(value = "properties") + private DelegatedSubnetProperties properties; /** - * Set the subnetDetails property: subnet details. + * Get the properties property: Properties of the provision operation request. * - * @param subnetDetails the subnetDetails value to set. - * @return the DelegatedSubnetInner object itself. - */ - public DelegatedSubnetInner withSubnetDetails(SubnetDetails subnetDetails) { - this.subnetDetails = subnetDetails; - return this; - } - - /** - * Get the controllerDetails property: Properties of the controller. - * - * @return the controllerDetails value. + * @return the properties value. */ - public ControllerDetails controllerDetails() { - return this.controllerDetails; + public DelegatedSubnetProperties properties() { + return this.properties; } /** - * Set the controllerDetails property: Properties of the controller. + * Set the properties property: Properties of the provision operation request. * - * @param controllerDetails the controllerDetails value to set. + * @param properties the properties value to set. * @return the DelegatedSubnetInner object itself. */ - public DelegatedSubnetInner withControllerDetails(ControllerDetails controllerDetails) { - this.controllerDetails = controllerDetails; + public DelegatedSubnetInner withProperties(DelegatedSubnetProperties properties) { + this.properties = properties; return this; } @@ -125,11 +65,8 @@ public DelegatedSubnetInner withTags(Map tags) { @Override public void validate() { super.validate(); - if (subnetDetails() != null) { - subnetDetails().validate(); - } - if (controllerDetails() != null) { - controllerDetails().validate(); + if (properties() != null) { + properties().validate(); } } } diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/OrchestratorInner.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/OrchestratorInner.java index 0c92f1200f070..0a7fdcb08b472 100644 --- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/OrchestratorInner.java +++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/OrchestratorInner.java @@ -5,212 +5,43 @@ package com.azure.resourcemanager.delegatednetwork.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.delegatednetwork.models.ControllerDetails; import com.azure.resourcemanager.delegatednetwork.models.OrchestratorIdentity; -import com.azure.resourcemanager.delegatednetwork.models.OrchestratorInstanceState; import com.azure.resourcemanager.delegatednetwork.models.OrchestratorKind; import com.azure.resourcemanager.delegatednetwork.models.OrchestratorResource; +import com.azure.resourcemanager.delegatednetwork.models.OrchestratorResourceProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Represents an instance of a orchestrator. */ -@JsonFlatten @Fluent -public class OrchestratorInner extends OrchestratorResource { +public final class OrchestratorInner extends OrchestratorResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(OrchestratorInner.class); /* - * Resource guid. + * Properties of the provision operation request. */ - @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) - private String resourceGuid; - - /* - * The current state of orchestratorInstance resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private OrchestratorInstanceState provisioningState; - - /* - * AAD ID used with apiserver - */ - @JsonProperty(value = "properties.orchestratorAppId") - private String orchestratorAppId; - - /* - * TenantID of server App ID - */ - @JsonProperty(value = "properties.orchestratorTenantId") - private String orchestratorTenantId; - - /* - * RootCA certificate of kubernetes cluster base64 encoded - */ - @JsonProperty(value = "properties.clusterRootCA") - private String clusterRootCA; - - /* - * K8s APIServer url. Either one of apiServerEndpoint or - * privateLinkResourceId can be specified - */ - @JsonProperty(value = "properties.apiServerEndpoint") - private String apiServerEndpoint; - - /* - * private link arm resource id. Either one of apiServerEndpoint or - * privateLinkResourceId can be specified - */ - @JsonProperty(value = "properties.privateLinkResourceId") - private String privateLinkResourceId; - - /* - * Properties of the controller. - */ - @JsonProperty(value = "properties.controllerDetails") - private ControllerDetails controllerDetails; - - /** - * Get the resourceGuid property: Resource guid. - * - * @return the resourceGuid value. - */ - public String resourceGuid() { - return this.resourceGuid; - } - - /** - * Get the provisioningState property: The current state of orchestratorInstance resource. - * - * @return the provisioningState value. - */ - public OrchestratorInstanceState provisioningState() { - return this.provisioningState; - } - - /** - * Get the orchestratorAppId property: AAD ID used with apiserver. - * - * @return the orchestratorAppId value. - */ - public String orchestratorAppId() { - return this.orchestratorAppId; - } - - /** - * Set the orchestratorAppId property: AAD ID used with apiserver. - * - * @param orchestratorAppId the orchestratorAppId value to set. - * @return the OrchestratorInner object itself. - */ - public OrchestratorInner withOrchestratorAppId(String orchestratorAppId) { - this.orchestratorAppId = orchestratorAppId; - return this; - } - - /** - * Get the orchestratorTenantId property: TenantID of server App ID. - * - * @return the orchestratorTenantId value. - */ - public String orchestratorTenantId() { - return this.orchestratorTenantId; - } - - /** - * Set the orchestratorTenantId property: TenantID of server App ID. - * - * @param orchestratorTenantId the orchestratorTenantId value to set. - * @return the OrchestratorInner object itself. - */ - public OrchestratorInner withOrchestratorTenantId(String orchestratorTenantId) { - this.orchestratorTenantId = orchestratorTenantId; - return this; - } - - /** - * Get the clusterRootCA property: RootCA certificate of kubernetes cluster base64 encoded. - * - * @return the clusterRootCA value. - */ - public String clusterRootCA() { - return this.clusterRootCA; - } - - /** - * Set the clusterRootCA property: RootCA certificate of kubernetes cluster base64 encoded. - * - * @param clusterRootCA the clusterRootCA value to set. - * @return the OrchestratorInner object itself. - */ - public OrchestratorInner withClusterRootCA(String clusterRootCA) { - this.clusterRootCA = clusterRootCA; - return this; - } - - /** - * Get the apiServerEndpoint property: K8s APIServer url. Either one of apiServerEndpoint or privateLinkResourceId - * can be specified. - * - * @return the apiServerEndpoint value. - */ - public String apiServerEndpoint() { - return this.apiServerEndpoint; - } - - /** - * Set the apiServerEndpoint property: K8s APIServer url. Either one of apiServerEndpoint or privateLinkResourceId - * can be specified. - * - * @param apiServerEndpoint the apiServerEndpoint value to set. - * @return the OrchestratorInner object itself. - */ - public OrchestratorInner withApiServerEndpoint(String apiServerEndpoint) { - this.apiServerEndpoint = apiServerEndpoint; - return this; - } - - /** - * Get the privateLinkResourceId property: private link arm resource id. Either one of apiServerEndpoint or - * privateLinkResourceId can be specified. - * - * @return the privateLinkResourceId value. - */ - public String privateLinkResourceId() { - return this.privateLinkResourceId; - } - - /** - * Set the privateLinkResourceId property: private link arm resource id. Either one of apiServerEndpoint or - * privateLinkResourceId can be specified. - * - * @param privateLinkResourceId the privateLinkResourceId value to set. - * @return the OrchestratorInner object itself. - */ - public OrchestratorInner withPrivateLinkResourceId(String privateLinkResourceId) { - this.privateLinkResourceId = privateLinkResourceId; - return this; - } + @JsonProperty(value = "properties") + private OrchestratorResourceProperties properties; /** - * Get the controllerDetails property: Properties of the controller. + * Get the properties property: Properties of the provision operation request. * - * @return the controllerDetails value. + * @return the properties value. */ - public ControllerDetails controllerDetails() { - return this.controllerDetails; + public OrchestratorResourceProperties properties() { + return this.properties; } /** - * Set the controllerDetails property: Properties of the controller. + * Set the properties property: Properties of the provision operation request. * - * @param controllerDetails the controllerDetails value to set. + * @param properties the properties value to set. * @return the OrchestratorInner object itself. */ - public OrchestratorInner withControllerDetails(ControllerDetails controllerDetails) { - this.controllerDetails = controllerDetails; + public OrchestratorInner withProperties(OrchestratorResourceProperties properties) { + this.properties = properties; return this; } @@ -250,8 +81,8 @@ public OrchestratorInner withTags(Map tags) { @Override public void validate() { super.validate(); - if (controllerDetails() != null) { - controllerDetails().validate(); + if (properties() != null) { + properties().validate(); } } } diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedControllerImpl.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedControllerImpl.java index b80b43b13394a..5427764991367 100644 --- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedControllerImpl.java +++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedControllerImpl.java @@ -8,8 +8,8 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.delegatednetwork.fluent.models.DelegatedControllerInner; import com.azure.resourcemanager.delegatednetwork.models.ControllerResourceUpdateParameters; -import com.azure.resourcemanager.delegatednetwork.models.ControllerState; import com.azure.resourcemanager.delegatednetwork.models.DelegatedController; +import com.azure.resourcemanager.delegatednetwork.models.DelegatedControllerProperties; import java.util.Collections; import java.util.Map; @@ -44,24 +44,8 @@ public Map tags() { } } - public String resourceGuid() { - return this.innerModel().resourceGuid(); - } - - public ControllerState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String dncAppId() { - return this.innerModel().dncAppId(); - } - - public String dncTenantId() { - return this.innerModel().dncTenantId(); - } - - public String dncEndpoint() { - return this.innerModel().dncEndpoint(); + public DelegatedControllerProperties properties() { + return this.innerModel().properties(); } public Region region() { diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedSubnetImpl.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedSubnetImpl.java index d022d165867fb..0ea946fbdc010 100644 --- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedSubnetImpl.java +++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedSubnetImpl.java @@ -7,11 +7,9 @@ import com.azure.core.management.Region; import com.azure.core.util.Context; import com.azure.resourcemanager.delegatednetwork.fluent.models.DelegatedSubnetInner; -import com.azure.resourcemanager.delegatednetwork.models.ControllerDetails; import com.azure.resourcemanager.delegatednetwork.models.DelegatedSubnet; -import com.azure.resourcemanager.delegatednetwork.models.DelegatedSubnetState; +import com.azure.resourcemanager.delegatednetwork.models.DelegatedSubnetProperties; import com.azure.resourcemanager.delegatednetwork.models.ResourceUpdateParameters; -import com.azure.resourcemanager.delegatednetwork.models.SubnetDetails; import java.util.Collections; import java.util.Map; @@ -45,20 +43,8 @@ public Map tags() { } } - public String resourceGuid() { - return this.innerModel().resourceGuid(); - } - - public DelegatedSubnetState provisioningState() { - return this.innerModel().provisioningState(); - } - - public SubnetDetails subnetDetails() { - return this.innerModel().subnetDetails(); - } - - public ControllerDetails controllerDetails() { - return this.innerModel().controllerDetails(); + public DelegatedSubnetProperties properties() { + return this.innerModel().properties(); } public Region region() { @@ -185,13 +171,8 @@ public DelegatedSubnetImpl withTags(Map tags) { } } - public DelegatedSubnetImpl withSubnetDetails(SubnetDetails subnetDetails) { - this.innerModel().withSubnetDetails(subnetDetails); - return this; - } - - public DelegatedSubnetImpl withControllerDetails(ControllerDetails controllerDetails) { - this.innerModel().withControllerDetails(controllerDetails); + public DelegatedSubnetImpl withProperties(DelegatedSubnetProperties properties) { + this.innerModel().withProperties(properties); return this; } diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/OrchestratorImpl.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/OrchestratorImpl.java index 4419c88e709e7..a19a5d02e096a 100644 --- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/OrchestratorImpl.java +++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/OrchestratorImpl.java @@ -7,11 +7,10 @@ import com.azure.core.management.Region; import com.azure.core.util.Context; import com.azure.resourcemanager.delegatednetwork.fluent.models.OrchestratorInner; -import com.azure.resourcemanager.delegatednetwork.models.ControllerDetails; import com.azure.resourcemanager.delegatednetwork.models.Orchestrator; import com.azure.resourcemanager.delegatednetwork.models.OrchestratorIdentity; -import com.azure.resourcemanager.delegatednetwork.models.OrchestratorInstanceState; import com.azure.resourcemanager.delegatednetwork.models.OrchestratorKind; +import com.azure.resourcemanager.delegatednetwork.models.OrchestratorResourceProperties; import com.azure.resourcemanager.delegatednetwork.models.OrchestratorResourceUpdateParameters; import java.util.Collections; import java.util.Map; @@ -54,36 +53,8 @@ public OrchestratorIdentity identity() { return this.innerModel().identity(); } - public String resourceGuid() { - return this.innerModel().resourceGuid(); - } - - public OrchestratorInstanceState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String orchestratorAppId() { - return this.innerModel().orchestratorAppId(); - } - - public String orchestratorTenantId() { - return this.innerModel().orchestratorTenantId(); - } - - public String clusterRootCA() { - return this.innerModel().clusterRootCA(); - } - - public String apiServerEndpoint() { - return this.innerModel().apiServerEndpoint(); - } - - public String privateLinkResourceId() { - return this.innerModel().privateLinkResourceId(); - } - - public ControllerDetails controllerDetails() { - return this.innerModel().controllerDetails(); + public OrchestratorResourceProperties properties() { + return this.innerModel().properties(); } public Region region() { @@ -221,33 +192,8 @@ public OrchestratorImpl withIdentity(OrchestratorIdentity identity) { return this; } - public OrchestratorImpl withOrchestratorAppId(String orchestratorAppId) { - this.innerModel().withOrchestratorAppId(orchestratorAppId); - return this; - } - - public OrchestratorImpl withOrchestratorTenantId(String orchestratorTenantId) { - this.innerModel().withOrchestratorTenantId(orchestratorTenantId); - return this; - } - - public OrchestratorImpl withClusterRootCA(String clusterRootCA) { - this.innerModel().withClusterRootCA(clusterRootCA); - return this; - } - - public OrchestratorImpl withApiServerEndpoint(String apiServerEndpoint) { - this.innerModel().withApiServerEndpoint(apiServerEndpoint); - return this; - } - - public OrchestratorImpl withPrivateLinkResourceId(String privateLinkResourceId) { - this.innerModel().withPrivateLinkResourceId(privateLinkResourceId); - return this; - } - - public OrchestratorImpl withControllerDetails(ControllerDetails controllerDetails) { - this.innerModel().withControllerDetails(controllerDetails); + public OrchestratorImpl withProperties(OrchestratorResourceProperties properties) { + this.innerModel().withProperties(properties); return this; } diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/DelegatedController.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/DelegatedController.java index 4543837b860e6..47816ae8690c9 100644 --- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/DelegatedController.java +++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/DelegatedController.java @@ -47,39 +47,11 @@ public interface DelegatedController { Map tags(); /** - * Gets the resourceGuid property: Resource guid. + * Gets the properties property: Properties of the provision operation request. * - * @return the resourceGuid value. + * @return the properties value. */ - String resourceGuid(); - - /** - * Gets the provisioningState property: The current state of dnc controller resource. - * - * @return the provisioningState value. - */ - ControllerState provisioningState(); - - /** - * Gets the dncAppId property: dnc application id should be used by customer to authenticate with dnc gateway. - * - * @return the dncAppId value. - */ - String dncAppId(); - - /** - * Gets the dncTenantId property: tenant id of dnc application id. - * - * @return the dncTenantId value. - */ - String dncTenantId(); - - /** - * Gets the dncEndpoint property: dnc endpoint url that customers can use to connect to. - * - * @return the dncEndpoint value. - */ - String dncEndpoint(); + DelegatedControllerProperties properties(); /** * Gets the region of the resource. diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/DelegatedControllerProperties.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/DelegatedControllerProperties.java new file mode 100644 index 0000000000000..f83e36cd7ea2a --- /dev/null +++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/DelegatedControllerProperties.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.delegatednetwork.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of Delegated controller resource. */ +@Immutable +public final class DelegatedControllerProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DelegatedControllerProperties.class); + + /* + * Resource guid. + */ + @JsonProperty(value = "resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /* + * The current state of dnc controller resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ControllerState provisioningState; + + /* + * dnc application id should be used by customer to authenticate with dnc + * gateway. + */ + @JsonProperty(value = "dncAppId", access = JsonProperty.Access.WRITE_ONLY) + private String dncAppId; + + /* + * tenant id of dnc application id + */ + @JsonProperty(value = "dncTenantId", access = JsonProperty.Access.WRITE_ONLY) + private String dncTenantId; + + /* + * dnc endpoint url that customers can use to connect to + */ + @JsonProperty(value = "dncEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String dncEndpoint; + + /** + * Get the resourceGuid property: Resource guid. + * + * @return the resourceGuid value. + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioningState property: The current state of dnc controller resource. + * + * @return the provisioningState value. + */ + public ControllerState provisioningState() { + return this.provisioningState; + } + + /** + * Get the dncAppId property: dnc application id should be used by customer to authenticate with dnc gateway. + * + * @return the dncAppId value. + */ + public String dncAppId() { + return this.dncAppId; + } + + /** + * Get the dncTenantId property: tenant id of dnc application id. + * + * @return the dncTenantId value. + */ + public String dncTenantId() { + return this.dncTenantId; + } + + /** + * Get the dncEndpoint property: dnc endpoint url that customers can use to connect to. + * + * @return the dncEndpoint value. + */ + public String dncEndpoint() { + return this.dncEndpoint; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/DelegatedSubnet.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/DelegatedSubnet.java index 5b5fb68ce855a..1e0d359d7b391 100644 --- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/DelegatedSubnet.java +++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/DelegatedSubnet.java @@ -47,32 +47,11 @@ public interface DelegatedSubnet { Map tags(); /** - * Gets the resourceGuid property: Resource guid. + * Gets the properties property: Properties of the provision operation request. * - * @return the resourceGuid value. + * @return the properties value. */ - String resourceGuid(); - - /** - * Gets the provisioningState property: The current state of dnc delegated subnet resource. - * - * @return the provisioningState value. - */ - DelegatedSubnetState provisioningState(); - - /** - * Gets the subnetDetails property: subnet details. - * - * @return the subnetDetails value. - */ - SubnetDetails subnetDetails(); - - /** - * Gets the controllerDetails property: Properties of the controller. - * - * @return the controllerDetails value. - */ - ControllerDetails controllerDetails(); + DelegatedSubnetProperties properties(); /** * Gets the region of the resource. @@ -139,10 +118,7 @@ interface WithResourceGroup { * The stage of the DelegatedSubnet definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithSubnetDetails, - DefinitionStages.WithControllerDetails { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { /** * Executes the create request. * @@ -168,25 +144,15 @@ interface WithTags { */ WithCreate withTags(Map tags); } - /** The stage of the DelegatedSubnet definition allowing to specify subnetDetails. */ - interface WithSubnetDetails { - /** - * Specifies the subnetDetails property: subnet details. - * - * @param subnetDetails subnet details. - * @return the next definition stage. - */ - WithCreate withSubnetDetails(SubnetDetails subnetDetails); - } - /** The stage of the DelegatedSubnet definition allowing to specify controllerDetails. */ - interface WithControllerDetails { + /** The stage of the DelegatedSubnet definition allowing to specify properties. */ + interface WithProperties { /** - * Specifies the controllerDetails property: Properties of the controller.. + * Specifies the properties property: Properties of the provision operation request.. * - * @param controllerDetails Properties of the controller. + * @param properties Properties of the provision operation request. * @return the next definition stage. */ - WithCreate withControllerDetails(ControllerDetails controllerDetails); + WithCreate withProperties(DelegatedSubnetProperties properties); } } /** diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/DelegatedSubnetProperties.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/DelegatedSubnetProperties.java new file mode 100644 index 0000000000000..4c759ff4cabf3 --- /dev/null +++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/DelegatedSubnetProperties.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.delegatednetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of delegated subnet. */ +@Fluent +public final class DelegatedSubnetProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DelegatedSubnetProperties.class); + + /* + * Resource guid. + */ + @JsonProperty(value = "resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /* + * The current state of dnc delegated subnet resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private DelegatedSubnetState provisioningState; + + /* + * subnet details + */ + @JsonProperty(value = "subnetDetails") + private SubnetDetails subnetDetails; + + /* + * Properties of the controller. + */ + @JsonProperty(value = "controllerDetails") + private ControllerDetails controllerDetails; + + /** + * Get the resourceGuid property: Resource guid. + * + * @return the resourceGuid value. + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioningState property: The current state of dnc delegated subnet resource. + * + * @return the provisioningState value. + */ + public DelegatedSubnetState provisioningState() { + return this.provisioningState; + } + + /** + * Get the subnetDetails property: subnet details. + * + * @return the subnetDetails value. + */ + public SubnetDetails subnetDetails() { + return this.subnetDetails; + } + + /** + * Set the subnetDetails property: subnet details. + * + * @param subnetDetails the subnetDetails value to set. + * @return the DelegatedSubnetProperties object itself. + */ + public DelegatedSubnetProperties withSubnetDetails(SubnetDetails subnetDetails) { + this.subnetDetails = subnetDetails; + return this; + } + + /** + * Get the controllerDetails property: Properties of the controller. + * + * @return the controllerDetails value. + */ + public ControllerDetails controllerDetails() { + return this.controllerDetails; + } + + /** + * Set the controllerDetails property: Properties of the controller. + * + * @param controllerDetails the controllerDetails value to set. + * @return the DelegatedSubnetProperties object itself. + */ + public DelegatedSubnetProperties withControllerDetails(ControllerDetails controllerDetails) { + this.controllerDetails = controllerDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subnetDetails() != null) { + subnetDetails().validate(); + } + if (controllerDetails() != null) { + controllerDetails().validate(); + } + } +} diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/ErrorAdditionalInfo.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/ErrorAdditionalInfo.java deleted file mode 100644 index f8c3777495079..0000000000000 --- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/ErrorAdditionalInfo.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.delegatednetwork.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The resource management error additional info. */ -@Immutable -public final class ErrorAdditionalInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ErrorAdditionalInfo.class); - - /* - * The additional info type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /* - * The additional info. - */ - @JsonProperty(value = "info", access = JsonProperty.Access.WRITE_ONLY) - private Object info; - - /** - * Get the type property: The additional info type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the info property: The additional info. - * - * @return the info value. - */ - public Object info() { - return this.info; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/Orchestrator.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/Orchestrator.java index 8619c781996ca..d6bdbfb56c55c 100644 --- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/Orchestrator.java +++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/Orchestrator.java @@ -61,62 +61,11 @@ public interface Orchestrator { OrchestratorIdentity identity(); /** - * Gets the resourceGuid property: Resource guid. + * Gets the properties property: Properties of the provision operation request. * - * @return the resourceGuid value. + * @return the properties value. */ - String resourceGuid(); - - /** - * Gets the provisioningState property: The current state of orchestratorInstance resource. - * - * @return the provisioningState value. - */ - OrchestratorInstanceState provisioningState(); - - /** - * Gets the orchestratorAppId property: AAD ID used with apiserver. - * - * @return the orchestratorAppId value. - */ - String orchestratorAppId(); - - /** - * Gets the orchestratorTenantId property: TenantID of server App ID. - * - * @return the orchestratorTenantId value. - */ - String orchestratorTenantId(); - - /** - * Gets the clusterRootCA property: RootCA certificate of kubernetes cluster base64 encoded. - * - * @return the clusterRootCA value. - */ - String clusterRootCA(); - - /** - * Gets the apiServerEndpoint property: K8s APIServer url. Either one of apiServerEndpoint or privateLinkResourceId - * can be specified. - * - * @return the apiServerEndpoint value. - */ - String apiServerEndpoint(); - - /** - * Gets the privateLinkResourceId property: private link arm resource id. Either one of apiServerEndpoint or - * privateLinkResourceId can be specified. - * - * @return the privateLinkResourceId value. - */ - String privateLinkResourceId(); - - /** - * Gets the controllerDetails property: Properties of the controller. - * - * @return the controllerDetails value. - */ - ControllerDetails controllerDetails(); + OrchestratorResourceProperties properties(); /** * Gets the region of the resource. @@ -195,14 +144,7 @@ interface WithKind { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithOrchestratorAppId, - DefinitionStages.WithOrchestratorTenantId, - DefinitionStages.WithClusterRootCA, - DefinitionStages.WithApiServerEndpoint, - DefinitionStages.WithPrivateLinkResourceId, - DefinitionStages.WithControllerDetails { + extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithProperties { /** * Executes the create request. * @@ -238,69 +180,15 @@ interface WithIdentity { */ WithCreate withIdentity(OrchestratorIdentity identity); } - /** The stage of the Orchestrator definition allowing to specify orchestratorAppId. */ - interface WithOrchestratorAppId { - /** - * Specifies the orchestratorAppId property: AAD ID used with apiserver. - * - * @param orchestratorAppId AAD ID used with apiserver. - * @return the next definition stage. - */ - WithCreate withOrchestratorAppId(String orchestratorAppId); - } - /** The stage of the Orchestrator definition allowing to specify orchestratorTenantId. */ - interface WithOrchestratorTenantId { - /** - * Specifies the orchestratorTenantId property: TenantID of server App ID. - * - * @param orchestratorTenantId TenantID of server App ID. - * @return the next definition stage. - */ - WithCreate withOrchestratorTenantId(String orchestratorTenantId); - } - /** The stage of the Orchestrator definition allowing to specify clusterRootCA. */ - interface WithClusterRootCA { - /** - * Specifies the clusterRootCA property: RootCA certificate of kubernetes cluster base64 encoded. - * - * @param clusterRootCA RootCA certificate of kubernetes cluster base64 encoded. - * @return the next definition stage. - */ - WithCreate withClusterRootCA(String clusterRootCA); - } - /** The stage of the Orchestrator definition allowing to specify apiServerEndpoint. */ - interface WithApiServerEndpoint { - /** - * Specifies the apiServerEndpoint property: K8s APIServer url. Either one of apiServerEndpoint or - * privateLinkResourceId can be specified. - * - * @param apiServerEndpoint K8s APIServer url. Either one of apiServerEndpoint or privateLinkResourceId can - * be specified. - * @return the next definition stage. - */ - WithCreate withApiServerEndpoint(String apiServerEndpoint); - } - /** The stage of the Orchestrator definition allowing to specify privateLinkResourceId. */ - interface WithPrivateLinkResourceId { - /** - * Specifies the privateLinkResourceId property: private link arm resource id. Either one of - * apiServerEndpoint or privateLinkResourceId can be specified. - * - * @param privateLinkResourceId private link arm resource id. Either one of apiServerEndpoint or - * privateLinkResourceId can be specified. - * @return the next definition stage. - */ - WithCreate withPrivateLinkResourceId(String privateLinkResourceId); - } - /** The stage of the Orchestrator definition allowing to specify controllerDetails. */ - interface WithControllerDetails { + /** The stage of the Orchestrator definition allowing to specify properties. */ + interface WithProperties { /** - * Specifies the controllerDetails property: Properties of the controller.. + * Specifies the properties property: Properties of the provision operation request.. * - * @param controllerDetails Properties of the controller. + * @param properties Properties of the provision operation request. * @return the next definition stage. */ - WithCreate withControllerDetails(ControllerDetails controllerDetails); + WithCreate withProperties(OrchestratorResourceProperties properties); } } /** diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/OrchestratorResourceProperties.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/OrchestratorResourceProperties.java new file mode 100644 index 0000000000000..46102d368ada2 --- /dev/null +++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/OrchestratorResourceProperties.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.delegatednetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of orchestrator. */ +@Fluent +public final class OrchestratorResourceProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OrchestratorResourceProperties.class); + + /* + * Resource guid. + */ + @JsonProperty(value = "resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /* + * The current state of orchestratorInstance resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private OrchestratorInstanceState provisioningState; + + /* + * AAD ID used with apiserver + */ + @JsonProperty(value = "orchestratorAppId") + private String orchestratorAppId; + + /* + * TenantID of server App ID + */ + @JsonProperty(value = "orchestratorTenantId") + private String orchestratorTenantId; + + /* + * RootCA certificate of kubernetes cluster base64 encoded + */ + @JsonProperty(value = "clusterRootCA") + private String clusterRootCA; + + /* + * K8s APIServer url. Either one of apiServerEndpoint or + * privateLinkResourceId can be specified + */ + @JsonProperty(value = "apiServerEndpoint") + private String apiServerEndpoint; + + /* + * private link arm resource id. Either one of apiServerEndpoint or + * privateLinkResourceId can be specified + */ + @JsonProperty(value = "privateLinkResourceId") + private String privateLinkResourceId; + + /* + * Properties of the controller. + */ + @JsonProperty(value = "controllerDetails", required = true) + private ControllerDetails controllerDetails; + + /** + * Get the resourceGuid property: Resource guid. + * + * @return the resourceGuid value. + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioningState property: The current state of orchestratorInstance resource. + * + * @return the provisioningState value. + */ + public OrchestratorInstanceState provisioningState() { + return this.provisioningState; + } + + /** + * Get the orchestratorAppId property: AAD ID used with apiserver. + * + * @return the orchestratorAppId value. + */ + public String orchestratorAppId() { + return this.orchestratorAppId; + } + + /** + * Set the orchestratorAppId property: AAD ID used with apiserver. + * + * @param orchestratorAppId the orchestratorAppId value to set. + * @return the OrchestratorResourceProperties object itself. + */ + public OrchestratorResourceProperties withOrchestratorAppId(String orchestratorAppId) { + this.orchestratorAppId = orchestratorAppId; + return this; + } + + /** + * Get the orchestratorTenantId property: TenantID of server App ID. + * + * @return the orchestratorTenantId value. + */ + public String orchestratorTenantId() { + return this.orchestratorTenantId; + } + + /** + * Set the orchestratorTenantId property: TenantID of server App ID. + * + * @param orchestratorTenantId the orchestratorTenantId value to set. + * @return the OrchestratorResourceProperties object itself. + */ + public OrchestratorResourceProperties withOrchestratorTenantId(String orchestratorTenantId) { + this.orchestratorTenantId = orchestratorTenantId; + return this; + } + + /** + * Get the clusterRootCA property: RootCA certificate of kubernetes cluster base64 encoded. + * + * @return the clusterRootCA value. + */ + public String clusterRootCA() { + return this.clusterRootCA; + } + + /** + * Set the clusterRootCA property: RootCA certificate of kubernetes cluster base64 encoded. + * + * @param clusterRootCA the clusterRootCA value to set. + * @return the OrchestratorResourceProperties object itself. + */ + public OrchestratorResourceProperties withClusterRootCA(String clusterRootCA) { + this.clusterRootCA = clusterRootCA; + return this; + } + + /** + * Get the apiServerEndpoint property: K8s APIServer url. Either one of apiServerEndpoint or privateLinkResourceId + * can be specified. + * + * @return the apiServerEndpoint value. + */ + public String apiServerEndpoint() { + return this.apiServerEndpoint; + } + + /** + * Set the apiServerEndpoint property: K8s APIServer url. Either one of apiServerEndpoint or privateLinkResourceId + * can be specified. + * + * @param apiServerEndpoint the apiServerEndpoint value to set. + * @return the OrchestratorResourceProperties object itself. + */ + public OrchestratorResourceProperties withApiServerEndpoint(String apiServerEndpoint) { + this.apiServerEndpoint = apiServerEndpoint; + return this; + } + + /** + * Get the privateLinkResourceId property: private link arm resource id. Either one of apiServerEndpoint or + * privateLinkResourceId can be specified. + * + * @return the privateLinkResourceId value. + */ + public String privateLinkResourceId() { + return this.privateLinkResourceId; + } + + /** + * Set the privateLinkResourceId property: private link arm resource id. Either one of apiServerEndpoint or + * privateLinkResourceId can be specified. + * + * @param privateLinkResourceId the privateLinkResourceId value to set. + * @return the OrchestratorResourceProperties object itself. + */ + public OrchestratorResourceProperties withPrivateLinkResourceId(String privateLinkResourceId) { + this.privateLinkResourceId = privateLinkResourceId; + return this; + } + + /** + * Get the controllerDetails property: Properties of the controller. + * + * @return the controllerDetails value. + */ + public ControllerDetails controllerDetails() { + return this.controllerDetails; + } + + /** + * Set the controllerDetails property: Properties of the controller. + * + * @param controllerDetails the controllerDetails value to set. + * @return the OrchestratorResourceProperties object itself. + */ + public OrchestratorResourceProperties withControllerDetails(ControllerDetails controllerDetails) { + this.controllerDetails = controllerDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (controllerDetails() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property controllerDetails in model OrchestratorResourceProperties")); + } else { + controllerDetails().validate(); + } + } +}