diff --git a/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md b/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md index bc982e4663a0..b5c044a77e22 100644 --- a/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md +++ b/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 1.0.0-beta.1 (2021-07-29) + +- Azure Resource Manager Batch client library for Java. This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2021-06. 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.2 (2021-07-29) - Azure Resource Manager Batch client library for Java. This package contains Microsoft Azure SDK for Batch Management SDK. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/batch/azure-resourcemanager-batch/README.md b/sdk/batch/azure-resourcemanager-batch/README.md index 24bdd72cc5d2..b0415ad51cbf 100644 --- a/sdk/batch/azure-resourcemanager-batch/README.md +++ b/sdk/batch/azure-resourcemanager-batch/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Batch client library for Java. -This package contains Microsoft Azure SDK for Batch Management SDK. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -74,7 +74,6 @@ See [API design][design] for general introduction on design and key concepts on ## Examples -[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/SAMPLE.md) ## Troubleshooting diff --git a/sdk/batch/azure-resourcemanager-batch/pom.xml b/sdk/batch/azure-resourcemanager-batch/pom.xml index 3525393cbc24..b545a5069f54 100644 --- a/sdk/batch/azure-resourcemanager-batch/pom.xml +++ b/sdk/batch/azure-resourcemanager-batch/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for Batch Management - This package contains Microsoft Azure SDK for Batch Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2021-06. + This package contains Microsoft Azure SDK for Batch Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Batch Client. Package tag package-2021-06. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/BatchManager.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/BatchManager.java index c84c8c5cfa63..526f9ce51d5c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/BatchManager.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/BatchManager.java @@ -20,11 +20,11 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batch.fluent.BatchManagement; +import com.azure.resourcemanager.batch.fluent.BatchManagementClient; import com.azure.resourcemanager.batch.implementation.ApplicationPackagesImpl; import com.azure.resourcemanager.batch.implementation.ApplicationsImpl; import com.azure.resourcemanager.batch.implementation.BatchAccountsImpl; -import com.azure.resourcemanager.batch.implementation.BatchManagementBuilder; +import com.azure.resourcemanager.batch.implementation.BatchManagementClientBuilder; import com.azure.resourcemanager.batch.implementation.CertificatesImpl; import com.azure.resourcemanager.batch.implementation.LocationsImpl; import com.azure.resourcemanager.batch.implementation.OperationsImpl; @@ -46,7 +46,7 @@ import java.util.List; import java.util.Objects; -/** Entry point to BatchManager. */ +/** Entry point to BatchManager. Batch Client. */ public final class BatchManager { private BatchAccounts batchAccounts; @@ -66,13 +66,13 @@ public final class BatchManager { private Pools pools; - private final BatchManagement clientObject; + private final BatchManagementClient clientObject; private BatchManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); this.clientObject = - new BatchManagementBuilder() + new BatchManagementClientBuilder() .pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) @@ -202,7 +202,7 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil .append("-") .append("com.azure.resourcemanager.batch") .append("/") - .append("1.0.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -315,10 +315,10 @@ public Pools pools() { } /** - * @return Wrapped service client BatchManagement providing direct access to the underlying auto-generated API + * @return Wrapped service client BatchManagementClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. */ - public BatchManagement serviceClient() { + public BatchManagementClient serviceClient() { return this.clientObject; } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchManagement.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchManagementClient.java similarity index 96% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchManagement.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchManagementClient.java index dd2c8e05e25f..29df78dc2098 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchManagement.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchManagementClient.java @@ -7,8 +7,8 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for BatchManagement class. */ -public interface BatchManagement { +/** The interface for BatchManagementClient class. */ +public interface BatchManagementClient { /** * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationInner.java index 4ec4ffd8f224..d61fc7b0939c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationInner.java @@ -5,45 +5,44 @@ package com.azure.resourcemanager.batch.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Contains information about an application in a Batch account. */ +@JsonFlatten @Fluent -public final class ApplicationInner extends ProxyResource { +public class ApplicationInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationInner.class); /* - * The properties associated with the Application. + * The display name for the application. */ - @JsonProperty(value = "properties") - private ApplicationProperties innerProperties; + @JsonProperty(value = "properties.displayName") + private String displayName; /* - * The ETag of the resource, used for concurrency statements. + * A value indicating whether packages within the application may be + * overwritten using the same version string. */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; + @JsonProperty(value = "properties.allowUpdates") + private Boolean allowUpdates; - /** - * Get the innerProperties property: The properties associated with the Application. - * - * @return the innerProperties value. + /* + * The package to use if a client requests the application but does not + * specify a version. This property can only be set to the name of an + * existing package. */ - private ApplicationProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.defaultVersion") + private String defaultVersion; - /** - * Get the etag property: The ETag of the resource, used for concurrency statements. - * - * @return the etag value. + /* + * The ETag of the resource, used for concurrency statements. */ - public String etag() { - return this.etag; - } + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; /** * Get the displayName property: The display name for the application. @@ -51,7 +50,7 @@ public String etag() { * @return the displayName value. */ public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); + return this.displayName; } /** @@ -61,10 +60,7 @@ public String displayName() { * @return the ApplicationInner object itself. */ public ApplicationInner withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new ApplicationProperties(); - } - this.innerProperties().withDisplayName(displayName); + this.displayName = displayName; return this; } @@ -75,7 +71,7 @@ public ApplicationInner withDisplayName(String displayName) { * @return the allowUpdates value. */ public Boolean allowUpdates() { - return this.innerProperties() == null ? null : this.innerProperties().allowUpdates(); + return this.allowUpdates; } /** @@ -86,10 +82,7 @@ public Boolean allowUpdates() { * @return the ApplicationInner object itself. */ public ApplicationInner withAllowUpdates(Boolean allowUpdates) { - if (this.innerProperties() == null) { - this.innerProperties = new ApplicationProperties(); - } - this.innerProperties().withAllowUpdates(allowUpdates); + this.allowUpdates = allowUpdates; return this; } @@ -100,7 +93,7 @@ public ApplicationInner withAllowUpdates(Boolean allowUpdates) { * @return the defaultVersion value. */ public String defaultVersion() { - return this.innerProperties() == null ? null : this.innerProperties().defaultVersion(); + return this.defaultVersion; } /** @@ -111,21 +104,24 @@ public String defaultVersion() { * @return the ApplicationInner object itself. */ public ApplicationInner withDefaultVersion(String defaultVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new ApplicationProperties(); - } - this.innerProperties().withDefaultVersion(defaultVersion); + this.defaultVersion = defaultVersion; return this; } + /** + * Get the etag property: The ETag of the resource, used for concurrency statements. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageInner.java index a92d092a50fa..9355bb571207 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageInner.java @@ -4,7 +4,8 @@ package com.azure.resourcemanager.batch.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.batch.models.PackageState; @@ -13,39 +14,47 @@ import java.time.OffsetDateTime; /** An application package which represents a particular version of an application. */ -@Fluent -public final class ApplicationPackageInner extends ProxyResource { +@JsonFlatten +@Immutable +public class ApplicationPackageInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationPackageInner.class); /* - * The properties associated with the Application Package. + * The current state of the application package. */ - @JsonProperty(value = "properties") - private ApplicationPackageProperties innerProperties; + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private PackageState state; /* - * The ETag of the resource, used for concurrency statements. + * The format of the application package, if the package is active. */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; + @JsonProperty(value = "properties.format", access = JsonProperty.Access.WRITE_ONLY) + private String format; - /** - * Get the innerProperties property: The properties associated with the Application Package. - * - * @return the innerProperties value. + /* + * The URL for the application package in Azure Storage. */ - private ApplicationPackageProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.storageUrl", access = JsonProperty.Access.WRITE_ONLY) + private String storageUrl; - /** - * Get the etag property: The ETag of the resource, used for concurrency statements. - * - * @return the etag value. + /* + * The UTC time at which the Azure Storage URL will expire. */ - public String etag() { - return this.etag; - } + @JsonProperty(value = "properties.storageUrlExpiry", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime storageUrlExpiry; + + /* + * The time at which the package was last activated, if the package is + * active. + */ + @JsonProperty(value = "properties.lastActivationTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastActivationTime; + + /* + * The ETag of the resource, used for concurrency statements. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; /** * Get the state property: The current state of the application package. @@ -53,7 +62,7 @@ public String etag() { * @return the state value. */ public PackageState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -62,7 +71,7 @@ public PackageState state() { * @return the format value. */ public String format() { - return this.innerProperties() == null ? null : this.innerProperties().format(); + return this.format; } /** @@ -71,7 +80,7 @@ public String format() { * @return the storageUrl value. */ public String storageUrl() { - return this.innerProperties() == null ? null : this.innerProperties().storageUrl(); + return this.storageUrl; } /** @@ -80,7 +89,7 @@ public String storageUrl() { * @return the storageUrlExpiry value. */ public OffsetDateTime storageUrlExpiry() { - return this.innerProperties() == null ? null : this.innerProperties().storageUrlExpiry(); + return this.storageUrlExpiry; } /** @@ -89,7 +98,16 @@ public OffsetDateTime storageUrlExpiry() { * @return the lastActivationTime value. */ public OffsetDateTime lastActivationTime() { - return this.innerProperties() == null ? null : this.innerProperties().lastActivationTime(); + return this.lastActivationTime; + } + + /** + * Get the etag property: The ETag of the resource, used for concurrency statements. + * + * @return the etag value. + */ + public String etag() { + return this.etag; } /** @@ -98,8 +116,5 @@ public OffsetDateTime lastActivationTime() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageProperties.java deleted file mode 100644 index 09ed64257d7b..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageProperties.java +++ /dev/null @@ -1,102 +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.batch.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batch.models.PackageState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Properties of an application package. */ -@Immutable -public final class ApplicationPackageProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationPackageProperties.class); - - /* - * The current state of the application package. - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private PackageState state; - - /* - * The format of the application package, if the package is active. - */ - @JsonProperty(value = "format", access = JsonProperty.Access.WRITE_ONLY) - private String format; - - /* - * The URL for the application package in Azure Storage. - */ - @JsonProperty(value = "storageUrl", access = JsonProperty.Access.WRITE_ONLY) - private String storageUrl; - - /* - * The UTC time at which the Azure Storage URL will expire. - */ - @JsonProperty(value = "storageUrlExpiry", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime storageUrlExpiry; - - /* - * The time at which the package was last activated, if the package is - * active. - */ - @JsonProperty(value = "lastActivationTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastActivationTime; - - /** - * Get the state property: The current state of the application package. - * - * @return the state value. - */ - public PackageState state() { - return this.state; - } - - /** - * Get the format property: The format of the application package, if the package is active. - * - * @return the format value. - */ - public String format() { - return this.format; - } - - /** - * Get the storageUrl property: The URL for the application package in Azure Storage. - * - * @return the storageUrl value. - */ - public String storageUrl() { - return this.storageUrl; - } - - /** - * Get the storageUrlExpiry property: The UTC time at which the Azure Storage URL will expire. - * - * @return the storageUrlExpiry value. - */ - public OffsetDateTime storageUrlExpiry() { - return this.storageUrlExpiry; - } - - /** - * Get the lastActivationTime property: The time at which the package was last activated, if the package is active. - * - * @return the lastActivationTime value. - */ - public OffsetDateTime lastActivationTime() { - return this.lastActivationTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationProperties.java deleted file mode 100644 index c83f254012d5..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationProperties.java +++ /dev/null @@ -1,109 +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.batch.fluent.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; - -/** The properties associated with the Application. */ -@Fluent -public final class ApplicationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationProperties.class); - - /* - * The display name for the application. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * A value indicating whether packages within the application may be - * overwritten using the same version string. - */ - @JsonProperty(value = "allowUpdates") - private Boolean allowUpdates; - - /* - * The package to use if a client requests the application but does not - * specify a version. This property can only be set to the name of an - * existing package. - */ - @JsonProperty(value = "defaultVersion") - private String defaultVersion; - - /** - * Get the displayName property: The display name for the application. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name for the application. - * - * @param displayName the displayName value to set. - * @return the ApplicationProperties object itself. - */ - public ApplicationProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the allowUpdates property: A value indicating whether packages within the application may be overwritten - * using the same version string. - * - * @return the allowUpdates value. - */ - public Boolean allowUpdates() { - return this.allowUpdates; - } - - /** - * Set the allowUpdates property: A value indicating whether packages within the application may be overwritten - * using the same version string. - * - * @param allowUpdates the allowUpdates value to set. - * @return the ApplicationProperties object itself. - */ - public ApplicationProperties withAllowUpdates(Boolean allowUpdates) { - this.allowUpdates = allowUpdates; - return this; - } - - /** - * Get the defaultVersion property: The package to use if a client requests the application but does not specify a - * version. This property can only be set to the name of an existing package. - * - * @return the defaultVersion value. - */ - public String defaultVersion() { - return this.defaultVersion; - } - - /** - * Set the defaultVersion property: The package to use if a client requests the application but does not specify a - * version. This property can only be set to the name of an existing package. - * - * @param defaultVersion the defaultVersion value to set. - * @return the ApplicationProperties object itself. - */ - public ApplicationProperties withDefaultVersion(String defaultVersion) { - this.defaultVersion = defaultVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountCreateProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountCreateProperties.java deleted file mode 100644 index e3cb1765a9a4..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountCreateProperties.java +++ /dev/null @@ -1,215 +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.batch.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batch.models.AuthenticationMode; -import com.azure.resourcemanager.batch.models.AutoStorageBaseProperties; -import com.azure.resourcemanager.batch.models.EncryptionProperties; -import com.azure.resourcemanager.batch.models.KeyVaultReference; -import com.azure.resourcemanager.batch.models.PoolAllocationMode; -import com.azure.resourcemanager.batch.models.PublicNetworkAccessType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The properties of a Batch account. */ -@Fluent -public final class BatchAccountCreateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BatchAccountCreateProperties.class); - - /* - * The properties related to the auto-storage account. - */ - @JsonProperty(value = "autoStorage") - private AutoStorageBaseProperties autoStorage; - - /* - * The pool allocation mode also affects how clients may authenticate to - * the Batch Service API. If the mode is BatchService, clients may - * authenticate using access keys or Azure Active Directory. If the mode is - * UserSubscription, clients must use Azure Active Directory. The default - * is BatchService. - */ - @JsonProperty(value = "poolAllocationMode") - private PoolAllocationMode poolAllocationMode; - - /* - * A reference to the Azure key vault associated with the Batch account. - */ - @JsonProperty(value = "keyVaultReference") - private KeyVaultReference keyVaultReference; - - /* - * If not specified, the default value is 'enabled'. - */ - @JsonProperty(value = "publicNetworkAccess") - private PublicNetworkAccessType publicNetworkAccess; - - /* - * Configures how customer data is encrypted inside the Batch account. By - * default, accounts are encrypted using a Microsoft managed key. For - * additional control, a customer-managed key can be used instead. - */ - @JsonProperty(value = "encryption") - private EncryptionProperties encryption; - - /* - * List of allowed authentication modes for the Batch account that can be - * used to authenticate with the data plane. This does not affect - * authentication with the control plane. - */ - @JsonProperty(value = "allowedAuthenticationModes") - private List allowedAuthenticationModes; - - /** - * Get the autoStorage property: The properties related to the auto-storage account. - * - * @return the autoStorage value. - */ - public AutoStorageBaseProperties autoStorage() { - return this.autoStorage; - } - - /** - * Set the autoStorage property: The properties related to the auto-storage account. - * - * @param autoStorage the autoStorage value to set. - * @return the BatchAccountCreateProperties object itself. - */ - public BatchAccountCreateProperties withAutoStorage(AutoStorageBaseProperties autoStorage) { - this.autoStorage = autoStorage; - return this; - } - - /** - * Get the poolAllocationMode property: The pool allocation mode also affects how clients may authenticate to the - * Batch Service API. If the mode is BatchService, clients may authenticate using access keys or Azure Active - * Directory. If the mode is UserSubscription, clients must use Azure Active Directory. The default is BatchService. - * - * @return the poolAllocationMode value. - */ - public PoolAllocationMode poolAllocationMode() { - return this.poolAllocationMode; - } - - /** - * Set the poolAllocationMode property: The pool allocation mode also affects how clients may authenticate to the - * Batch Service API. If the mode is BatchService, clients may authenticate using access keys or Azure Active - * Directory. If the mode is UserSubscription, clients must use Azure Active Directory. The default is BatchService. - * - * @param poolAllocationMode the poolAllocationMode value to set. - * @return the BatchAccountCreateProperties object itself. - */ - public BatchAccountCreateProperties withPoolAllocationMode(PoolAllocationMode poolAllocationMode) { - this.poolAllocationMode = poolAllocationMode; - return this; - } - - /** - * Get the keyVaultReference property: A reference to the Azure key vault associated with the Batch account. - * - * @return the keyVaultReference value. - */ - public KeyVaultReference keyVaultReference() { - return this.keyVaultReference; - } - - /** - * Set the keyVaultReference property: A reference to the Azure key vault associated with the Batch account. - * - * @param keyVaultReference the keyVaultReference value to set. - * @return the BatchAccountCreateProperties object itself. - */ - public BatchAccountCreateProperties withKeyVaultReference(KeyVaultReference keyVaultReference) { - this.keyVaultReference = keyVaultReference; - return this; - } - - /** - * Get the publicNetworkAccess property: If not specified, the default value is 'enabled'. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccessType publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: If not specified, the default value is 'enabled'. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the BatchAccountCreateProperties object itself. - */ - public BatchAccountCreateProperties withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Get the encryption property: Configures how customer data is encrypted inside the Batch account. By default, - * accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used - * instead. - * - * @return the encryption value. - */ - public EncryptionProperties encryption() { - return this.encryption; - } - - /** - * Set the encryption property: Configures how customer data is encrypted inside the Batch account. By default, - * accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used - * instead. - * - * @param encryption the encryption value to set. - * @return the BatchAccountCreateProperties object itself. - */ - public BatchAccountCreateProperties withEncryption(EncryptionProperties encryption) { - this.encryption = encryption; - return this; - } - - /** - * Get the allowedAuthenticationModes property: List of allowed authentication modes for the Batch account that can - * be used to authenticate with the data plane. This does not affect authentication with the control plane. - * - * @return the allowedAuthenticationModes value. - */ - public List allowedAuthenticationModes() { - return this.allowedAuthenticationModes; - } - - /** - * Set the allowedAuthenticationModes property: List of allowed authentication modes for the Batch account that can - * be used to authenticate with the data plane. This does not affect authentication with the control plane. - * - * @param allowedAuthenticationModes the allowedAuthenticationModes value to set. - * @return the BatchAccountCreateProperties object itself. - */ - public BatchAccountCreateProperties withAllowedAuthenticationModes( - List allowedAuthenticationModes) { - this.allowedAuthenticationModes = allowedAuthenticationModes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (autoStorage() != null) { - autoStorage().validate(); - } - if (keyVaultReference() != null) { - keyVaultReference().validate(); - } - if (encryption() != null) { - encryption().validate(); - } - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountInner.java index 00221efeca71..db65b5267122 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.batch.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.batch.models.AuthenticationMode; @@ -22,30 +23,126 @@ import java.util.Map; /** Contains information about an Azure Batch account. */ +@JsonFlatten @Fluent -public final class BatchAccountInner extends Resource { +public class BatchAccountInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(BatchAccountInner.class); - /* - * The properties associated with the account. - */ - @JsonProperty(value = "properties") - private BatchAccountProperties innerProperties; - /* * The identity of the Batch account. */ @JsonProperty(value = "identity") private BatchAccountIdentity identity; - /** - * Get the innerProperties property: The properties associated with the account. - * - * @return the innerProperties value. + /* + * The account endpoint used to interact with the Batch service. */ - private BatchAccountProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.accountEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String accountEndpoint; + + /* + * The provisioned state of the resource + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The allocation mode for creating pools in the Batch account. + */ + @JsonProperty(value = "properties.poolAllocationMode", access = JsonProperty.Access.WRITE_ONLY) + private PoolAllocationMode poolAllocationMode; + + /* + * Identifies the Azure key vault associated with a Batch account. + */ + @JsonProperty(value = "properties.keyVaultReference", access = JsonProperty.Access.WRITE_ONLY) + private KeyVaultReference keyVaultReference; + + /* + * If not specified, the default value is 'enabled'. + */ + @JsonProperty(value = "properties.publicNetworkAccess", access = JsonProperty.Access.WRITE_ONLY) + private PublicNetworkAccessType publicNetworkAccess; + + /* + * List of private endpoint connections associated with the Batch account + */ + @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + + /* + * Contains information about the auto-storage account associated with a + * Batch account. + */ + @JsonProperty(value = "properties.autoStorage", access = JsonProperty.Access.WRITE_ONLY) + private AutoStorageProperties autoStorage; + + /* + * Configures how customer data is encrypted inside the Batch account. By + * default, accounts are encrypted using a Microsoft managed key. For + * additional control, a customer-managed key can be used instead. + */ + @JsonProperty(value = "properties.encryption", access = JsonProperty.Access.WRITE_ONLY) + private EncryptionProperties encryption; + + /* + * The dedicated core quota for the Batch account. For accounts with + * PoolAllocationMode set to UserSubscription, quota is managed on the + * subscription so this value is not returned. + */ + @JsonProperty(value = "properties.dedicatedCoreQuota", access = JsonProperty.Access.WRITE_ONLY) + private Integer dedicatedCoreQuota; + + /* + * The low-priority core quota for the Batch account. For accounts with + * PoolAllocationMode set to UserSubscription, quota is managed on the + * subscription so this value is not returned. + */ + @JsonProperty(value = "properties.lowPriorityCoreQuota", access = JsonProperty.Access.WRITE_ONLY) + private Integer lowPriorityCoreQuota; + + /* + * A list of the dedicated core quota per Virtual Machine family for the + * Batch account. For accounts with PoolAllocationMode set to + * UserSubscription, quota is managed on the subscription so this value is + * not returned. + */ + @JsonProperty(value = "properties.dedicatedCoreQuotaPerVMFamily", access = JsonProperty.Access.WRITE_ONLY) + private List dedicatedCoreQuotaPerVMFamily; + + /* + * A value indicating whether core quotas per Virtual Machine family are + * enforced for this account Batch is transitioning its core quota system + * for dedicated cores to be enforced per Virtual Machine family. During + * this transitional phase, the dedicated core quota per Virtual Machine + * family may not yet be enforced. If this flag is false, dedicated core + * quota is enforced via the old dedicatedCoreQuota property on the account + * and does not consider Virtual Machine family. If this flag is true, + * dedicated core quota is enforced via the dedicatedCoreQuotaPerVMFamily + * property on the account, and the old dedicatedCoreQuota does not apply. + */ + @JsonProperty(value = "properties.dedicatedCoreQuotaPerVMFamilyEnforced", access = JsonProperty.Access.WRITE_ONLY) + private Boolean dedicatedCoreQuotaPerVMFamilyEnforced; + + /* + * The pool quota for the Batch account. + */ + @JsonProperty(value = "properties.poolQuota", access = JsonProperty.Access.WRITE_ONLY) + private Integer poolQuota; + + /* + * The active job and job schedule quota for the Batch account. + */ + @JsonProperty(value = "properties.activeJobAndJobScheduleQuota", access = JsonProperty.Access.WRITE_ONLY) + private Integer activeJobAndJobScheduleQuota; + + /* + * List of allowed authentication modes for the Batch account that can be + * used to authenticate with the data plane. This does not affect + * authentication with the control plane. + */ + @JsonProperty(value = "properties.allowedAuthenticationModes", access = JsonProperty.Access.WRITE_ONLY) + private List allowedAuthenticationModes; /** * Get the identity property: The identity of the Batch account. @@ -67,27 +164,13 @@ public BatchAccountInner withIdentity(BatchAccountIdentity identity) { return this; } - /** {@inheritDoc} */ - @Override - public BatchAccountInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchAccountInner withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * Get the accountEndpoint property: The account endpoint used to interact with the Batch service. * * @return the accountEndpoint value. */ public String accountEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().accountEndpoint(); + return this.accountEndpoint; } /** @@ -96,7 +179,7 @@ public String accountEndpoint() { * @return the provisioningState value. */ public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -105,7 +188,7 @@ public ProvisioningState provisioningState() { * @return the poolAllocationMode value. */ public PoolAllocationMode poolAllocationMode() { - return this.innerProperties() == null ? null : this.innerProperties().poolAllocationMode(); + return this.poolAllocationMode; } /** @@ -114,7 +197,7 @@ public PoolAllocationMode poolAllocationMode() { * @return the keyVaultReference value. */ public KeyVaultReference keyVaultReference() { - return this.innerProperties() == null ? null : this.innerProperties().keyVaultReference(); + return this.keyVaultReference; } /** @@ -123,7 +206,7 @@ public KeyVaultReference keyVaultReference() { * @return the publicNetworkAccess value. */ public PublicNetworkAccessType publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + return this.publicNetworkAccess; } /** @@ -133,7 +216,7 @@ public PublicNetworkAccessType publicNetworkAccess() { * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); + return this.privateEndpointConnections; } /** @@ -143,7 +226,7 @@ public List privateEndpointConnections() { * @return the autoStorage value. */ public AutoStorageProperties autoStorage() { - return this.innerProperties() == null ? null : this.innerProperties().autoStorage(); + return this.autoStorage; } /** @@ -154,7 +237,7 @@ public AutoStorageProperties autoStorage() { * @return the encryption value. */ public EncryptionProperties encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); + return this.encryption; } /** @@ -164,7 +247,7 @@ public EncryptionProperties encryption() { * @return the dedicatedCoreQuota value. */ public Integer dedicatedCoreQuota() { - return this.innerProperties() == null ? null : this.innerProperties().dedicatedCoreQuota(); + return this.dedicatedCoreQuota; } /** @@ -174,7 +257,7 @@ public Integer dedicatedCoreQuota() { * @return the lowPriorityCoreQuota value. */ public Integer lowPriorityCoreQuota() { - return this.innerProperties() == null ? null : this.innerProperties().lowPriorityCoreQuota(); + return this.lowPriorityCoreQuota; } /** @@ -185,7 +268,7 @@ public Integer lowPriorityCoreQuota() { * @return the dedicatedCoreQuotaPerVMFamily value. */ public List dedicatedCoreQuotaPerVMFamily() { - return this.innerProperties() == null ? null : this.innerProperties().dedicatedCoreQuotaPerVMFamily(); + return this.dedicatedCoreQuotaPerVMFamily; } /** @@ -200,7 +283,7 @@ public List dedicatedCoreQuotaPerVMFamily() { * @return the dedicatedCoreQuotaPerVMFamilyEnforced value. */ public Boolean dedicatedCoreQuotaPerVMFamilyEnforced() { - return this.innerProperties() == null ? null : this.innerProperties().dedicatedCoreQuotaPerVMFamilyEnforced(); + return this.dedicatedCoreQuotaPerVMFamilyEnforced; } /** @@ -209,7 +292,7 @@ public Boolean dedicatedCoreQuotaPerVMFamilyEnforced() { * @return the poolQuota value. */ public Integer poolQuota() { - return this.innerProperties() == null ? null : this.innerProperties().poolQuota(); + return this.poolQuota; } /** @@ -218,7 +301,7 @@ public Integer poolQuota() { * @return the activeJobAndJobScheduleQuota value. */ public Integer activeJobAndJobScheduleQuota() { - return this.innerProperties() == null ? null : this.innerProperties().activeJobAndJobScheduleQuota(); + return this.activeJobAndJobScheduleQuota; } /** @@ -228,7 +311,21 @@ public Integer activeJobAndJobScheduleQuota() { * @return the allowedAuthenticationModes value. */ public List allowedAuthenticationModes() { - return this.innerProperties() == null ? null : this.innerProperties().allowedAuthenticationModes(); + return this.allowedAuthenticationModes; + } + + /** {@inheritDoc} */ + @Override + public BatchAccountInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public BatchAccountInner withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -237,11 +334,23 @@ public List allowedAuthenticationModes() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } if (identity() != null) { identity().validate(); } + if (keyVaultReference() != null) { + keyVaultReference().validate(); + } + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } + if (autoStorage() != null) { + autoStorage().validate(); + } + if (encryption() != null) { + encryption().validate(); + } + if (dedicatedCoreQuotaPerVMFamily() != null) { + dedicatedCoreQuotaPerVMFamily().forEach(e -> e.validate()); + } } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountProperties.java deleted file mode 100644 index cdc6e055a500..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountProperties.java +++ /dev/null @@ -1,308 +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.batch.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batch.models.AuthenticationMode; -import com.azure.resourcemanager.batch.models.AutoStorageProperties; -import com.azure.resourcemanager.batch.models.EncryptionProperties; -import com.azure.resourcemanager.batch.models.KeyVaultReference; -import com.azure.resourcemanager.batch.models.PoolAllocationMode; -import com.azure.resourcemanager.batch.models.ProvisioningState; -import com.azure.resourcemanager.batch.models.PublicNetworkAccessType; -import com.azure.resourcemanager.batch.models.VirtualMachineFamilyCoreQuota; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Account specific properties. */ -@Immutable -public final class BatchAccountProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BatchAccountProperties.class); - - /* - * The account endpoint used to interact with the Batch service. - */ - @JsonProperty(value = "accountEndpoint", access = JsonProperty.Access.WRITE_ONLY) - private String accountEndpoint; - - /* - * The provisioned state of the resource - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * The allocation mode for creating pools in the Batch account. - */ - @JsonProperty(value = "poolAllocationMode", access = JsonProperty.Access.WRITE_ONLY) - private PoolAllocationMode poolAllocationMode; - - /* - * Identifies the Azure key vault associated with a Batch account. - */ - @JsonProperty(value = "keyVaultReference", access = JsonProperty.Access.WRITE_ONLY) - private KeyVaultReference keyVaultReference; - - /* - * If not specified, the default value is 'enabled'. - */ - @JsonProperty(value = "publicNetworkAccess", access = JsonProperty.Access.WRITE_ONLY) - private PublicNetworkAccessType publicNetworkAccess; - - /* - * List of private endpoint connections associated with the Batch account - */ - @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) - private List privateEndpointConnections; - - /* - * Contains information about the auto-storage account associated with a - * Batch account. - */ - @JsonProperty(value = "autoStorage", access = JsonProperty.Access.WRITE_ONLY) - private AutoStorageProperties autoStorage; - - /* - * Configures how customer data is encrypted inside the Batch account. By - * default, accounts are encrypted using a Microsoft managed key. For - * additional control, a customer-managed key can be used instead. - */ - @JsonProperty(value = "encryption", access = JsonProperty.Access.WRITE_ONLY) - private EncryptionProperties encryption; - - /* - * The dedicated core quota for the Batch account. For accounts with - * PoolAllocationMode set to UserSubscription, quota is managed on the - * subscription so this value is not returned. - */ - @JsonProperty(value = "dedicatedCoreQuota", access = JsonProperty.Access.WRITE_ONLY) - private Integer dedicatedCoreQuota; - - /* - * The low-priority core quota for the Batch account. For accounts with - * PoolAllocationMode set to UserSubscription, quota is managed on the - * subscription so this value is not returned. - */ - @JsonProperty(value = "lowPriorityCoreQuota", access = JsonProperty.Access.WRITE_ONLY) - private Integer lowPriorityCoreQuota; - - /* - * A list of the dedicated core quota per Virtual Machine family for the - * Batch account. For accounts with PoolAllocationMode set to - * UserSubscription, quota is managed on the subscription so this value is - * not returned. - */ - @JsonProperty(value = "dedicatedCoreQuotaPerVMFamily", access = JsonProperty.Access.WRITE_ONLY) - private List dedicatedCoreQuotaPerVMFamily; - - /* - * A value indicating whether core quotas per Virtual Machine family are - * enforced for this account Batch is transitioning its core quota system - * for dedicated cores to be enforced per Virtual Machine family. During - * this transitional phase, the dedicated core quota per Virtual Machine - * family may not yet be enforced. If this flag is false, dedicated core - * quota is enforced via the old dedicatedCoreQuota property on the account - * and does not consider Virtual Machine family. If this flag is true, - * dedicated core quota is enforced via the dedicatedCoreQuotaPerVMFamily - * property on the account, and the old dedicatedCoreQuota does not apply. - */ - @JsonProperty(value = "dedicatedCoreQuotaPerVMFamilyEnforced", access = JsonProperty.Access.WRITE_ONLY) - private Boolean dedicatedCoreQuotaPerVMFamilyEnforced; - - /* - * The pool quota for the Batch account. - */ - @JsonProperty(value = "poolQuota", access = JsonProperty.Access.WRITE_ONLY) - private Integer poolQuota; - - /* - * The active job and job schedule quota for the Batch account. - */ - @JsonProperty(value = "activeJobAndJobScheduleQuota", access = JsonProperty.Access.WRITE_ONLY) - private Integer activeJobAndJobScheduleQuota; - - /* - * List of allowed authentication modes for the Batch account that can be - * used to authenticate with the data plane. This does not affect - * authentication with the control plane. - */ - @JsonProperty(value = "allowedAuthenticationModes", access = JsonProperty.Access.WRITE_ONLY) - private List allowedAuthenticationModes; - - /** - * Get the accountEndpoint property: The account endpoint used to interact with the Batch service. - * - * @return the accountEndpoint value. - */ - public String accountEndpoint() { - return this.accountEndpoint; - } - - /** - * Get the provisioningState property: The provisioned state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the poolAllocationMode property: The allocation mode for creating pools in the Batch account. - * - * @return the poolAllocationMode value. - */ - public PoolAllocationMode poolAllocationMode() { - return this.poolAllocationMode; - } - - /** - * Get the keyVaultReference property: Identifies the Azure key vault associated with a Batch account. - * - * @return the keyVaultReference value. - */ - public KeyVaultReference keyVaultReference() { - return this.keyVaultReference; - } - - /** - * Get the publicNetworkAccess property: If not specified, the default value is 'enabled'. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccessType publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Get the privateEndpointConnections property: List of private endpoint connections associated with the Batch - * account. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** - * Get the autoStorage property: Contains information about the auto-storage account associated with a Batch - * account. - * - * @return the autoStorage value. - */ - public AutoStorageProperties autoStorage() { - return this.autoStorage; - } - - /** - * Get the encryption property: Configures how customer data is encrypted inside the Batch account. By default, - * accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used - * instead. - * - * @return the encryption value. - */ - public EncryptionProperties encryption() { - return this.encryption; - } - - /** - * Get the dedicatedCoreQuota property: The dedicated core quota for the Batch account. For accounts with - * PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value is not returned. - * - * @return the dedicatedCoreQuota value. - */ - public Integer dedicatedCoreQuota() { - return this.dedicatedCoreQuota; - } - - /** - * Get the lowPriorityCoreQuota property: The low-priority core quota for the Batch account. For accounts with - * PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value is not returned. - * - * @return the lowPriorityCoreQuota value. - */ - public Integer lowPriorityCoreQuota() { - return this.lowPriorityCoreQuota; - } - - /** - * Get the dedicatedCoreQuotaPerVMFamily property: A list of the dedicated core quota per Virtual Machine family for - * the Batch account. For accounts with PoolAllocationMode set to UserSubscription, quota is managed on the - * subscription so this value is not returned. - * - * @return the dedicatedCoreQuotaPerVMFamily value. - */ - public List dedicatedCoreQuotaPerVMFamily() { - return this.dedicatedCoreQuotaPerVMFamily; - } - - /** - * Get the dedicatedCoreQuotaPerVMFamilyEnforced property: A value indicating whether core quotas per Virtual - * Machine family are enforced for this account Batch is transitioning its core quota system for dedicated cores to - * be enforced per Virtual Machine family. During this transitional phase, the dedicated core quota per Virtual - * Machine family may not yet be enforced. If this flag is false, dedicated core quota is enforced via the old - * dedicatedCoreQuota property on the account and does not consider Virtual Machine family. If this flag is true, - * dedicated core quota is enforced via the dedicatedCoreQuotaPerVMFamily property on the account, and the old - * dedicatedCoreQuota does not apply. - * - * @return the dedicatedCoreQuotaPerVMFamilyEnforced value. - */ - public Boolean dedicatedCoreQuotaPerVMFamilyEnforced() { - return this.dedicatedCoreQuotaPerVMFamilyEnforced; - } - - /** - * Get the poolQuota property: The pool quota for the Batch account. - * - * @return the poolQuota value. - */ - public Integer poolQuota() { - return this.poolQuota; - } - - /** - * Get the activeJobAndJobScheduleQuota property: The active job and job schedule quota for the Batch account. - * - * @return the activeJobAndJobScheduleQuota value. - */ - public Integer activeJobAndJobScheduleQuota() { - return this.activeJobAndJobScheduleQuota; - } - - /** - * Get the allowedAuthenticationModes property: List of allowed authentication modes for the Batch account that can - * be used to authenticate with the data plane. This does not affect authentication with the control plane. - * - * @return the allowedAuthenticationModes value. - */ - public List allowedAuthenticationModes() { - return this.allowedAuthenticationModes; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyVaultReference() != null) { - keyVaultReference().validate(); - } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - if (autoStorage() != null) { - autoStorage().validate(); - } - if (encryption() != null) { - encryption().validate(); - } - if (dedicatedCoreQuotaPerVMFamily() != null) { - dedicatedCoreQuotaPerVMFamily().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountUpdateProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountUpdateProperties.java deleted file mode 100644 index 66b51a518ee2..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountUpdateProperties.java +++ /dev/null @@ -1,123 +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.batch.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batch.models.AuthenticationMode; -import com.azure.resourcemanager.batch.models.AutoStorageBaseProperties; -import com.azure.resourcemanager.batch.models.EncryptionProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The properties of a Batch account. */ -@Fluent -public final class BatchAccountUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BatchAccountUpdateProperties.class); - - /* - * The properties related to the auto-storage account. - */ - @JsonProperty(value = "autoStorage") - private AutoStorageBaseProperties autoStorage; - - /* - * Configures how customer data is encrypted inside the Batch account. By - * default, accounts are encrypted using a Microsoft managed key. For - * additional control, a customer-managed key can be used instead. - */ - @JsonProperty(value = "encryption") - private EncryptionProperties encryption; - - /* - * List of allowed authentication modes for the Batch account that can be - * used to authenticate with the data plane. This does not affect - * authentication with the control plane. - */ - @JsonProperty(value = "allowedAuthenticationModes") - private List allowedAuthenticationModes; - - /** - * Get the autoStorage property: The properties related to the auto-storage account. - * - * @return the autoStorage value. - */ - public AutoStorageBaseProperties autoStorage() { - return this.autoStorage; - } - - /** - * Set the autoStorage property: The properties related to the auto-storage account. - * - * @param autoStorage the autoStorage value to set. - * @return the BatchAccountUpdateProperties object itself. - */ - public BatchAccountUpdateProperties withAutoStorage(AutoStorageBaseProperties autoStorage) { - this.autoStorage = autoStorage; - return this; - } - - /** - * Get the encryption property: Configures how customer data is encrypted inside the Batch account. By default, - * accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used - * instead. - * - * @return the encryption value. - */ - public EncryptionProperties encryption() { - return this.encryption; - } - - /** - * Set the encryption property: Configures how customer data is encrypted inside the Batch account. By default, - * accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used - * instead. - * - * @param encryption the encryption value to set. - * @return the BatchAccountUpdateProperties object itself. - */ - public BatchAccountUpdateProperties withEncryption(EncryptionProperties encryption) { - this.encryption = encryption; - return this; - } - - /** - * Get the allowedAuthenticationModes property: List of allowed authentication modes for the Batch account that can - * be used to authenticate with the data plane. This does not affect authentication with the control plane. - * - * @return the allowedAuthenticationModes value. - */ - public List allowedAuthenticationModes() { - return this.allowedAuthenticationModes; - } - - /** - * Set the allowedAuthenticationModes property: List of allowed authentication modes for the Batch account that can - * be used to authenticate with the data plane. This does not affect authentication with the control plane. - * - * @param allowedAuthenticationModes the allowedAuthenticationModes value to set. - * @return the BatchAccountUpdateProperties object itself. - */ - public BatchAccountUpdateProperties withAllowedAuthenticationModes( - List allowedAuthenticationModes) { - this.allowedAuthenticationModes = allowedAuthenticationModes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (autoStorage() != null) { - autoStorage().validate(); - } - if (encryption() != null) { - encryption().validate(); - } - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CertificateInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CertificateInner.java index 663422a5c4f8..4caa8bdce841 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CertificateInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CertificateInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.batch.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.batch.models.CertificateFormat; @@ -15,95 +16,74 @@ import java.time.OffsetDateTime; /** Contains information about a certificate. */ +@JsonFlatten @Fluent -public final class CertificateInner extends ProxyResource { +public class CertificateInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateInner.class); /* - * The properties associated with the certificate. + * The algorithm of the certificate thumbprint. This must match the first + * portion of the certificate name. Currently required to be 'SHA1'. */ - @JsonProperty(value = "properties") - private CertificateProperties innerProperties; + @JsonProperty(value = "properties.thumbprintAlgorithm") + private String thumbprintAlgorithm; /* - * The ETag of the resource, used for concurrency statements. + * The thumbprint of the certificate. This must match the thumbprint from + * the name. */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; + @JsonProperty(value = "properties.thumbprint") + private String thumbprint; - /** - * Get the innerProperties property: The properties associated with the certificate. - * - * @return the innerProperties value. + /* + * The format of the certificate - either Pfx or Cer. If omitted, the + * default is Pfx. */ - private CertificateProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.format") + private CertificateFormat format; - /** - * Get the etag property: The ETag of the resource, used for concurrency statements. - * - * @return the etag value. + /* + * The provisioningState property. */ - public String etag() { - return this.etag; - } + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private CertificateProvisioningState provisioningState; - /** - * Get the provisioningState property: The provisioningState property. - * - * @return the provisioningState value. + /* + * The time at which the certificate entered its current state. */ - public CertificateProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } + @JsonProperty(value = "properties.provisioningStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime provisioningStateTransitionTime; - /** - * Get the provisioningStateTransitionTime property: The time at which the certificate entered its current state. - * - * @return the provisioningStateTransitionTime value. + /* + * The previous provisioned state of the resource */ - public OffsetDateTime provisioningStateTransitionTime() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningStateTransitionTime(); - } + @JsonProperty(value = "properties.previousProvisioningState", access = JsonProperty.Access.WRITE_ONLY) + private CertificateProvisioningState previousProvisioningState; - /** - * Get the previousProvisioningState property: The previous provisioned state of the resource. - * - * @return the previousProvisioningState value. + /* + * The time at which the certificate entered its previous state. */ - public CertificateProvisioningState previousProvisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().previousProvisioningState(); - } + @JsonProperty(value = "properties.previousProvisioningStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime previousProvisioningStateTransitionTime; - /** - * Get the previousProvisioningStateTransitionTime property: The time at which the certificate entered its previous - * state. - * - * @return the previousProvisioningStateTransitionTime value. + /* + * The public key of the certificate. */ - public OffsetDateTime previousProvisioningStateTransitionTime() { - return this.innerProperties() == null ? null : this.innerProperties().previousProvisioningStateTransitionTime(); - } + @JsonProperty(value = "properties.publicData", access = JsonProperty.Access.WRITE_ONLY) + private String publicData; - /** - * Get the publicData property: The public key of the certificate. - * - * @return the publicData value. + /* + * This is only returned when the certificate provisioningState is + * 'Failed'. */ - public String publicData() { - return this.innerProperties() == null ? null : this.innerProperties().publicData(); - } + @JsonProperty(value = "properties.deleteCertificateError", access = JsonProperty.Access.WRITE_ONLY) + private DeleteCertificateError deleteCertificateError; - /** - * Get the deleteCertificateError property: This is only returned when the certificate provisioningState is - * 'Failed'. - * - * @return the deleteCertificateError value. + /* + * The ETag of the resource, used for concurrency statements. */ - public DeleteCertificateError deleteCertificateError() { - return this.innerProperties() == null ? null : this.innerProperties().deleteCertificateError(); - } + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; /** * Get the thumbprintAlgorithm property: The algorithm of the certificate thumbprint. This must match the first @@ -112,7 +92,7 @@ public DeleteCertificateError deleteCertificateError() { * @return the thumbprintAlgorithm value. */ public String thumbprintAlgorithm() { - return this.innerProperties() == null ? null : this.innerProperties().thumbprintAlgorithm(); + return this.thumbprintAlgorithm; } /** @@ -123,10 +103,7 @@ public String thumbprintAlgorithm() { * @return the CertificateInner object itself. */ public CertificateInner withThumbprintAlgorithm(String thumbprintAlgorithm) { - if (this.innerProperties() == null) { - this.innerProperties = new CertificateProperties(); - } - this.innerProperties().withThumbprintAlgorithm(thumbprintAlgorithm); + this.thumbprintAlgorithm = thumbprintAlgorithm; return this; } @@ -136,7 +113,7 @@ public CertificateInner withThumbprintAlgorithm(String thumbprintAlgorithm) { * @return the thumbprint value. */ public String thumbprint() { - return this.innerProperties() == null ? null : this.innerProperties().thumbprint(); + return this.thumbprint; } /** @@ -146,10 +123,7 @@ public String thumbprint() { * @return the CertificateInner object itself. */ public CertificateInner withThumbprint(String thumbprint) { - if (this.innerProperties() == null) { - this.innerProperties = new CertificateProperties(); - } - this.innerProperties().withThumbprint(thumbprint); + this.thumbprint = thumbprint; return this; } @@ -159,7 +133,7 @@ public CertificateInner withThumbprint(String thumbprint) { * @return the format value. */ public CertificateFormat format() { - return this.innerProperties() == null ? null : this.innerProperties().format(); + return this.format; } /** @@ -169,21 +143,83 @@ public CertificateFormat format() { * @return the CertificateInner object itself. */ public CertificateInner withFormat(CertificateFormat format) { - if (this.innerProperties() == null) { - this.innerProperties = new CertificateProperties(); - } - this.innerProperties().withFormat(format); + this.format = format; return this; } + /** + * Get the provisioningState property: The provisioningState property. + * + * @return the provisioningState value. + */ + public CertificateProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the provisioningStateTransitionTime property: The time at which the certificate entered its current state. + * + * @return the provisioningStateTransitionTime value. + */ + public OffsetDateTime provisioningStateTransitionTime() { + return this.provisioningStateTransitionTime; + } + + /** + * Get the previousProvisioningState property: The previous provisioned state of the resource. + * + * @return the previousProvisioningState value. + */ + public CertificateProvisioningState previousProvisioningState() { + return this.previousProvisioningState; + } + + /** + * Get the previousProvisioningStateTransitionTime property: The time at which the certificate entered its previous + * state. + * + * @return the previousProvisioningStateTransitionTime value. + */ + public OffsetDateTime previousProvisioningStateTransitionTime() { + return this.previousProvisioningStateTransitionTime; + } + + /** + * Get the publicData property: The public key of the certificate. + * + * @return the publicData value. + */ + public String publicData() { + return this.publicData; + } + + /** + * Get the deleteCertificateError property: This is only returned when the certificate provisioningState is + * 'Failed'. + * + * @return the deleteCertificateError value. + */ + public DeleteCertificateError deleteCertificateError() { + return this.deleteCertificateError; + } + + /** + * Get the etag property: The ETag of the resource, used for concurrency statements. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (deleteCertificateError() != null) { + deleteCertificateError().validate(); } } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolInner.java index 6967a25236e4..f8d46b355902 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.batch.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.batch.models.AllocationState; @@ -29,37 +30,231 @@ import java.util.List; /** Contains information about a pool. */ +@JsonFlatten @Fluent -public final class PoolInner extends ProxyResource { +public class PoolInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(PoolInner.class); - /* - * The properties associated with the pool. - */ - @JsonProperty(value = "properties") - private PoolProperties innerProperties; - /* * The type of identity used for the Batch Pool. */ @JsonProperty(value = "identity") private BatchPoolIdentity identity; + /* + * The display name for the pool. The display name need not be unique and + * can contain any Unicode characters up to a maximum length of 1024. + */ + @JsonProperty(value = "properties.displayName") + private String displayName; + + /* + * The last modified time of the pool. This is the last time at which the + * pool level data, such as the targetDedicatedNodes or autoScaleSettings, + * changed. It does not factor in node-level changes such as a compute node + * changing state. + */ + @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastModified; + + /* + * The creation time of the pool. + */ + @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime creationTime; + + /* + * The current state of the pool. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PoolProvisioningState provisioningState; + + /* + * The time at which the pool entered its current state. + */ + @JsonProperty(value = "properties.provisioningStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime provisioningStateTransitionTime; + + /* + * Whether the pool is resizing. + */ + @JsonProperty(value = "properties.allocationState", access = JsonProperty.Access.WRITE_ONLY) + private AllocationState allocationState; + + /* + * The time at which the pool entered its current allocation state. + */ + @JsonProperty(value = "properties.allocationStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime allocationStateTransitionTime; + + /* + * The size of virtual machines in the pool. All VMs in a pool are the same + * size. For information about available sizes of virtual machines for + * Cloud Services pools (pools created with cloudServiceConfiguration), see + * Sizes for Cloud Services + * (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). + * Batch supports all Cloud Services VM sizes except ExtraSmall. For + * information about available VM sizes for pools using images from the + * Virtual Machines Marketplace (pools created with + * virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) + * (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) + * or Sizes for Virtual Machines (Windows) + * (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). + * Batch supports all Azure VM sizes except STANDARD_A0 and those with + * premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + */ + @JsonProperty(value = "properties.vmSize") + private String vmSize; + + /* + * Deployment configuration properties. Using CloudServiceConfiguration + * specifies that the nodes should be creating using Azure Cloud Services + * (PaaS), while VirtualMachineConfiguration uses Azure Virtual Machines + * (IaaS). + */ + @JsonProperty(value = "properties.deploymentConfiguration") + private DeploymentConfiguration deploymentConfiguration; + + /* + * The number of compute nodes currently in the pool. + */ + @JsonProperty(value = "properties.currentDedicatedNodes", access = JsonProperty.Access.WRITE_ONLY) + private Integer currentDedicatedNodes; + + /* + * The number of low-priority compute nodes currently in the pool. + */ + @JsonProperty(value = "properties.currentLowPriorityNodes", access = JsonProperty.Access.WRITE_ONLY) + private Integer currentLowPriorityNodes; + + /* + * Scale settings for the pool Defines the desired size of the pool. This + * can either be 'fixedScale' where the requested targetDedicatedNodes is + * specified, or 'autoScale' which defines a formula which is periodically + * reevaluated. If this property is not specified, the pool will have a + * fixed scale with 0 targetDedicatedNodes. + */ + @JsonProperty(value = "properties.scaleSettings") + private ScaleSettings scaleSettings; + + /* + * The results and errors from an execution of a pool autoscale formula. + * This property is set only if the pool automatically scales, i.e. + * autoScaleSettings are used. + */ + @JsonProperty(value = "properties.autoScaleRun", access = JsonProperty.Access.WRITE_ONLY) + private AutoScaleRun autoScaleRun; + + /* + * Whether the pool permits direct communication between nodes. This + * imposes restrictions on which nodes can be assigned to the pool. + * Enabling this value can reduce the chance of the requested number of + * nodes to be allocated in the pool. If not specified, this value defaults + * to 'Disabled'. + */ + @JsonProperty(value = "properties.interNodeCommunication") + private InterNodeCommunicationState interNodeCommunication; + + /* + * The network configuration for a pool. + */ + @JsonProperty(value = "properties.networkConfiguration") + private NetworkConfiguration networkConfiguration; + + /* + * The number of task slots that can be used to run concurrent tasks on a + * single compute node in the pool. The default value is 1. The maximum + * value is the smaller of 4 times the number of cores of the vmSize of the + * pool or 256. + */ + @JsonProperty(value = "properties.taskSlotsPerNode") + private Integer taskSlotsPerNode; + + /* + * Specifies how tasks should be distributed across compute nodes. If not + * specified, the default is spread. + */ + @JsonProperty(value = "properties.taskSchedulingPolicy") + private TaskSchedulingPolicy taskSchedulingPolicy; + + /* + * The list of user accounts to be created on each node in the pool. + */ + @JsonProperty(value = "properties.userAccounts") + private List userAccounts; + + /* + * A list of name-value pairs associated with the pool as metadata. The + * Batch service does not assign any meaning to metadata; it is solely for + * the use of user code. + */ + @JsonProperty(value = "properties.metadata") + private List metadata; + + /* + * A task which is run when a compute node joins a pool in the Azure Batch + * service, or when the compute node is rebooted or reimaged. In an PATCH + * (update) operation, this property can be set to an empty object to + * remove the start task from the pool. + */ + @JsonProperty(value = "properties.startTask") + private StartTask startTask; + + /* + * The list of certificates to be installed on each compute node in the + * pool. For Windows compute nodes, the Batch service installs the + * certificates to the specified certificate store and location. For Linux + * compute nodes, the certificates are stored in a directory inside the + * task working directory and an environment variable + * AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this + * location. For certificates with visibility of 'remoteUser', a 'certs' + * directory is created in the user's home directory (e.g., + * /home/{user-name}/certs) and certificates are placed in that directory. + */ + @JsonProperty(value = "properties.certificates") + private List certificates; + + /* + * The list of application packages to be installed on each compute node in + * the pool. Changes to application package references affect all new + * compute nodes joining the pool, but do not affect compute nodes that are + * already in the pool until they are rebooted or reimaged. There is a + * maximum of 10 application package references on any given pool. + */ + @JsonProperty(value = "properties.applicationPackages") + private List applicationPackages; + + /* + * The list of application licenses the Batch service will make available + * on each compute node in the pool. The list of application licenses must + * be a subset of available Batch service application licenses. If a + * license is requested which is not supported, pool creation will fail. + */ + @JsonProperty(value = "properties.applicationLicenses") + private List applicationLicenses; + + /* + * Details about the current or last completed resize operation. Describes + * either the current operation (if the pool AllocationState is Resizing) + * or the previously completed operation (if the AllocationState is + * Steady). + */ + @JsonProperty(value = "properties.resizeOperationStatus", access = JsonProperty.Access.WRITE_ONLY) + private ResizeOperationStatus resizeOperationStatus; + + /* + * A list of file systems to mount on each node in the pool. This supports + * Azure Files, NFS, CIFS/SMB, and Blobfuse. + */ + @JsonProperty(value = "properties.mountConfiguration") + private List mountConfiguration; + /* * The ETag of the resource, used for concurrency statements. */ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) private String etag; - /** - * Get the innerProperties property: The properties associated with the pool. - * - * @return the innerProperties value. - */ - private PoolProperties innerProperties() { - return this.innerProperties; - } - /** * Get the identity property: The type of identity used for the Batch Pool. * @@ -80,15 +275,6 @@ public PoolInner withIdentity(BatchPoolIdentity identity) { return this; } - /** - * Get the etag property: The ETag of the resource, used for concurrency statements. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - /** * Get the displayName property: The display name for the pool. The display name need not be unique and can contain * any Unicode characters up to a maximum length of 1024. @@ -96,7 +282,7 @@ public String etag() { * @return the displayName value. */ public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); + return this.displayName; } /** @@ -107,10 +293,7 @@ public String displayName() { * @return the PoolInner object itself. */ public PoolInner withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withDisplayName(displayName); + this.displayName = displayName; return this; } @@ -122,7 +305,7 @@ public PoolInner withDisplayName(String displayName) { * @return the lastModified value. */ public OffsetDateTime lastModified() { - return this.innerProperties() == null ? null : this.innerProperties().lastModified(); + return this.lastModified; } /** @@ -131,7 +314,7 @@ public OffsetDateTime lastModified() { * @return the creationTime value. */ public OffsetDateTime creationTime() { - return this.innerProperties() == null ? null : this.innerProperties().creationTime(); + return this.creationTime; } /** @@ -140,7 +323,7 @@ public OffsetDateTime creationTime() { * @return the provisioningState value. */ public PoolProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -149,7 +332,7 @@ public PoolProvisioningState provisioningState() { * @return the provisioningStateTransitionTime value. */ public OffsetDateTime provisioningStateTransitionTime() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningStateTransitionTime(); + return this.provisioningStateTransitionTime; } /** @@ -158,7 +341,7 @@ public OffsetDateTime provisioningStateTransitionTime() { * @return the allocationState value. */ public AllocationState allocationState() { - return this.innerProperties() == null ? null : this.innerProperties().allocationState(); + return this.allocationState; } /** @@ -167,7 +350,7 @@ public AllocationState allocationState() { * @return the allocationStateTransitionTime value. */ public OffsetDateTime allocationStateTransitionTime() { - return this.innerProperties() == null ? null : this.innerProperties().allocationStateTransitionTime(); + return this.allocationStateTransitionTime; } /** @@ -185,7 +368,7 @@ public OffsetDateTime allocationStateTransitionTime() { * @return the vmSize value. */ public String vmSize() { - return this.innerProperties() == null ? null : this.innerProperties().vmSize(); + return this.vmSize; } /** @@ -204,10 +387,7 @@ public String vmSize() { * @return the PoolInner object itself. */ public PoolInner withVmSize(String vmSize) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withVmSize(vmSize); + this.vmSize = vmSize; return this; } @@ -219,7 +399,7 @@ public PoolInner withVmSize(String vmSize) { * @return the deploymentConfiguration value. */ public DeploymentConfiguration deploymentConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().deploymentConfiguration(); + return this.deploymentConfiguration; } /** @@ -231,10 +411,7 @@ public DeploymentConfiguration deploymentConfiguration() { * @return the PoolInner object itself. */ public PoolInner withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withDeploymentConfiguration(deploymentConfiguration); + this.deploymentConfiguration = deploymentConfiguration; return this; } @@ -244,7 +421,7 @@ public PoolInner withDeploymentConfiguration(DeploymentConfiguration deploymentC * @return the currentDedicatedNodes value. */ public Integer currentDedicatedNodes() { - return this.innerProperties() == null ? null : this.innerProperties().currentDedicatedNodes(); + return this.currentDedicatedNodes; } /** @@ -253,7 +430,7 @@ public Integer currentDedicatedNodes() { * @return the currentLowPriorityNodes value. */ public Integer currentLowPriorityNodes() { - return this.innerProperties() == null ? null : this.innerProperties().currentLowPriorityNodes(); + return this.currentLowPriorityNodes; } /** @@ -265,7 +442,7 @@ public Integer currentLowPriorityNodes() { * @return the scaleSettings value. */ public ScaleSettings scaleSettings() { - return this.innerProperties() == null ? null : this.innerProperties().scaleSettings(); + return this.scaleSettings; } /** @@ -278,10 +455,7 @@ public ScaleSettings scaleSettings() { * @return the PoolInner object itself. */ public PoolInner withScaleSettings(ScaleSettings scaleSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withScaleSettings(scaleSettings); + this.scaleSettings = scaleSettings; return this; } @@ -292,7 +466,7 @@ public PoolInner withScaleSettings(ScaleSettings scaleSettings) { * @return the autoScaleRun value. */ public AutoScaleRun autoScaleRun() { - return this.innerProperties() == null ? null : this.innerProperties().autoScaleRun(); + return this.autoScaleRun; } /** @@ -303,7 +477,7 @@ public AutoScaleRun autoScaleRun() { * @return the interNodeCommunication value. */ public InterNodeCommunicationState interNodeCommunication() { - return this.innerProperties() == null ? null : this.innerProperties().interNodeCommunication(); + return this.interNodeCommunication; } /** @@ -315,10 +489,7 @@ public InterNodeCommunicationState interNodeCommunication() { * @return the PoolInner object itself. */ public PoolInner withInterNodeCommunication(InterNodeCommunicationState interNodeCommunication) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withInterNodeCommunication(interNodeCommunication); + this.interNodeCommunication = interNodeCommunication; return this; } @@ -328,7 +499,7 @@ public PoolInner withInterNodeCommunication(InterNodeCommunicationState interNod * @return the networkConfiguration value. */ public NetworkConfiguration networkConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().networkConfiguration(); + return this.networkConfiguration; } /** @@ -338,10 +509,7 @@ public NetworkConfiguration networkConfiguration() { * @return the PoolInner object itself. */ public PoolInner withNetworkConfiguration(NetworkConfiguration networkConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withNetworkConfiguration(networkConfiguration); + this.networkConfiguration = networkConfiguration; return this; } @@ -353,7 +521,7 @@ public PoolInner withNetworkConfiguration(NetworkConfiguration networkConfigurat * @return the taskSlotsPerNode value. */ public Integer taskSlotsPerNode() { - return this.innerProperties() == null ? null : this.innerProperties().taskSlotsPerNode(); + return this.taskSlotsPerNode; } /** @@ -365,10 +533,7 @@ public Integer taskSlotsPerNode() { * @return the PoolInner object itself. */ public PoolInner withTaskSlotsPerNode(Integer taskSlotsPerNode) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withTaskSlotsPerNode(taskSlotsPerNode); + this.taskSlotsPerNode = taskSlotsPerNode; return this; } @@ -379,7 +544,7 @@ public PoolInner withTaskSlotsPerNode(Integer taskSlotsPerNode) { * @return the taskSchedulingPolicy value. */ public TaskSchedulingPolicy taskSchedulingPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().taskSchedulingPolicy(); + return this.taskSchedulingPolicy; } /** @@ -390,10 +555,7 @@ public TaskSchedulingPolicy taskSchedulingPolicy() { * @return the PoolInner object itself. */ public PoolInner withTaskSchedulingPolicy(TaskSchedulingPolicy taskSchedulingPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withTaskSchedulingPolicy(taskSchedulingPolicy); + this.taskSchedulingPolicy = taskSchedulingPolicy; return this; } @@ -403,7 +565,7 @@ public PoolInner withTaskSchedulingPolicy(TaskSchedulingPolicy taskSchedulingPol * @return the userAccounts value. */ public List userAccounts() { - return this.innerProperties() == null ? null : this.innerProperties().userAccounts(); + return this.userAccounts; } /** @@ -413,10 +575,7 @@ public List userAccounts() { * @return the PoolInner object itself. */ public PoolInner withUserAccounts(List userAccounts) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withUserAccounts(userAccounts); + this.userAccounts = userAccounts; return this; } @@ -427,7 +586,7 @@ public PoolInner withUserAccounts(List userAccounts) { * @return the metadata value. */ public List metadata() { - return this.innerProperties() == null ? null : this.innerProperties().metadata(); + return this.metadata; } /** @@ -438,10 +597,7 @@ public List metadata() { * @return the PoolInner object itself. */ public PoolInner withMetadata(List metadata) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withMetadata(metadata); + this.metadata = metadata; return this; } @@ -453,7 +609,7 @@ public PoolInner withMetadata(List metadata) { * @return the startTask value. */ public StartTask startTask() { - return this.innerProperties() == null ? null : this.innerProperties().startTask(); + return this.startTask; } /** @@ -465,10 +621,7 @@ public StartTask startTask() { * @return the PoolInner object itself. */ public PoolInner withStartTask(StartTask startTask) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withStartTask(startTask); + this.startTask = startTask; return this; } @@ -483,7 +636,7 @@ public PoolInner withStartTask(StartTask startTask) { * @return the certificates value. */ public List certificates() { - return this.innerProperties() == null ? null : this.innerProperties().certificates(); + return this.certificates; } /** @@ -498,10 +651,7 @@ public List certificates() { * @return the PoolInner object itself. */ public PoolInner withCertificates(List certificates) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withCertificates(certificates); + this.certificates = certificates; return this; } @@ -514,7 +664,7 @@ public PoolInner withCertificates(List certificates) { * @return the applicationPackages value. */ public List applicationPackages() { - return this.innerProperties() == null ? null : this.innerProperties().applicationPackages(); + return this.applicationPackages; } /** @@ -527,10 +677,7 @@ public List applicationPackages() { * @return the PoolInner object itself. */ public PoolInner withApplicationPackages(List applicationPackages) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withApplicationPackages(applicationPackages); + this.applicationPackages = applicationPackages; return this; } @@ -542,7 +689,7 @@ public PoolInner withApplicationPackages(List appli * @return the applicationLicenses value. */ public List applicationLicenses() { - return this.innerProperties() == null ? null : this.innerProperties().applicationLicenses(); + return this.applicationLicenses; } /** @@ -554,10 +701,7 @@ public List applicationLicenses() { * @return the PoolInner object itself. */ public PoolInner withApplicationLicenses(List applicationLicenses) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withApplicationLicenses(applicationLicenses); + this.applicationLicenses = applicationLicenses; return this; } @@ -569,7 +713,7 @@ public PoolInner withApplicationLicenses(List applicationLicenses) { * @return the resizeOperationStatus value. */ public ResizeOperationStatus resizeOperationStatus() { - return this.innerProperties() == null ? null : this.innerProperties().resizeOperationStatus(); + return this.resizeOperationStatus; } /** @@ -579,7 +723,7 @@ public ResizeOperationStatus resizeOperationStatus() { * @return the mountConfiguration value. */ public List mountConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().mountConfiguration(); + return this.mountConfiguration; } /** @@ -590,24 +734,63 @@ public List mountConfiguration() { * @return the PoolInner object itself. */ public PoolInner withMountConfiguration(List mountConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withMountConfiguration(mountConfiguration); + this.mountConfiguration = mountConfiguration; return this; } + /** + * Get the etag property: The ETag of the resource, used for concurrency statements. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } if (identity() != null) { identity().validate(); } + if (deploymentConfiguration() != null) { + deploymentConfiguration().validate(); + } + if (scaleSettings() != null) { + scaleSettings().validate(); + } + if (autoScaleRun() != null) { + autoScaleRun().validate(); + } + if (networkConfiguration() != null) { + networkConfiguration().validate(); + } + if (taskSchedulingPolicy() != null) { + taskSchedulingPolicy().validate(); + } + if (userAccounts() != null) { + userAccounts().forEach(e -> e.validate()); + } + if (metadata() != null) { + metadata().forEach(e -> e.validate()); + } + if (startTask() != null) { + startTask().validate(); + } + if (certificates() != null) { + certificates().forEach(e -> e.validate()); + } + if (applicationPackages() != null) { + applicationPackages().forEach(e -> e.validate()); + } + if (resizeOperationStatus() != null) { + resizeOperationStatus().validate(); + } + if (mountConfiguration() != null) { + mountConfiguration().forEach(e -> e.validate()); + } } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolProperties.java deleted file mode 100644 index aa6b0c8addde..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolProperties.java +++ /dev/null @@ -1,748 +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.batch.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batch.models.AllocationState; -import com.azure.resourcemanager.batch.models.ApplicationPackageReference; -import com.azure.resourcemanager.batch.models.AutoScaleRun; -import com.azure.resourcemanager.batch.models.CertificateReference; -import com.azure.resourcemanager.batch.models.DeploymentConfiguration; -import com.azure.resourcemanager.batch.models.InterNodeCommunicationState; -import com.azure.resourcemanager.batch.models.MetadataItem; -import com.azure.resourcemanager.batch.models.MountConfiguration; -import com.azure.resourcemanager.batch.models.NetworkConfiguration; -import com.azure.resourcemanager.batch.models.PoolProvisioningState; -import com.azure.resourcemanager.batch.models.ResizeOperationStatus; -import com.azure.resourcemanager.batch.models.ScaleSettings; -import com.azure.resourcemanager.batch.models.StartTask; -import com.azure.resourcemanager.batch.models.TaskSchedulingPolicy; -import com.azure.resourcemanager.batch.models.UserAccount; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Pool properties. */ -@Fluent -public final class PoolProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PoolProperties.class); - - /* - * The display name for the pool. The display name need not be unique and - * can contain any Unicode characters up to a maximum length of 1024. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * The last modified time of the pool. This is the last time at which the - * pool level data, such as the targetDedicatedNodes or autoScaleSettings, - * changed. It does not factor in node-level changes such as a compute node - * changing state. - */ - @JsonProperty(value = "lastModified", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModified; - - /* - * The creation time of the pool. - */ - @JsonProperty(value = "creationTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationTime; - - /* - * The current state of the pool. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private PoolProvisioningState provisioningState; - - /* - * The time at which the pool entered its current state. - */ - @JsonProperty(value = "provisioningStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime provisioningStateTransitionTime; - - /* - * Whether the pool is resizing. - */ - @JsonProperty(value = "allocationState", access = JsonProperty.Access.WRITE_ONLY) - private AllocationState allocationState; - - /* - * The time at which the pool entered its current allocation state. - */ - @JsonProperty(value = "allocationStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime allocationStateTransitionTime; - - /* - * The size of virtual machines in the pool. All VMs in a pool are the same - * size. For information about available sizes of virtual machines for - * Cloud Services pools (pools created with cloudServiceConfiguration), see - * Sizes for Cloud Services - * (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). - * Batch supports all Cloud Services VM sizes except ExtraSmall. For - * information about available VM sizes for pools using images from the - * Virtual Machines Marketplace (pools created with - * virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) - * (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) - * or Sizes for Virtual Machines (Windows) - * (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). - * Batch supports all Azure VM sizes except STANDARD_A0 and those with - * premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). - */ - @JsonProperty(value = "vmSize") - private String vmSize; - - /* - * Deployment configuration properties. Using CloudServiceConfiguration - * specifies that the nodes should be creating using Azure Cloud Services - * (PaaS), while VirtualMachineConfiguration uses Azure Virtual Machines - * (IaaS). - */ - @JsonProperty(value = "deploymentConfiguration") - private DeploymentConfiguration deploymentConfiguration; - - /* - * The number of compute nodes currently in the pool. - */ - @JsonProperty(value = "currentDedicatedNodes", access = JsonProperty.Access.WRITE_ONLY) - private Integer currentDedicatedNodes; - - /* - * The number of low-priority compute nodes currently in the pool. - */ - @JsonProperty(value = "currentLowPriorityNodes", access = JsonProperty.Access.WRITE_ONLY) - private Integer currentLowPriorityNodes; - - /* - * Scale settings for the pool Defines the desired size of the pool. This - * can either be 'fixedScale' where the requested targetDedicatedNodes is - * specified, or 'autoScale' which defines a formula which is periodically - * reevaluated. If this property is not specified, the pool will have a - * fixed scale with 0 targetDedicatedNodes. - */ - @JsonProperty(value = "scaleSettings") - private ScaleSettings scaleSettings; - - /* - * The results and errors from an execution of a pool autoscale formula. - * This property is set only if the pool automatically scales, i.e. - * autoScaleSettings are used. - */ - @JsonProperty(value = "autoScaleRun", access = JsonProperty.Access.WRITE_ONLY) - private AutoScaleRun autoScaleRun; - - /* - * Whether the pool permits direct communication between nodes. This - * imposes restrictions on which nodes can be assigned to the pool. - * Enabling this value can reduce the chance of the requested number of - * nodes to be allocated in the pool. If not specified, this value defaults - * to 'Disabled'. - */ - @JsonProperty(value = "interNodeCommunication") - private InterNodeCommunicationState interNodeCommunication; - - /* - * The network configuration for a pool. - */ - @JsonProperty(value = "networkConfiguration") - private NetworkConfiguration networkConfiguration; - - /* - * The number of task slots that can be used to run concurrent tasks on a - * single compute node in the pool. The default value is 1. The maximum - * value is the smaller of 4 times the number of cores of the vmSize of the - * pool or 256. - */ - @JsonProperty(value = "taskSlotsPerNode") - private Integer taskSlotsPerNode; - - /* - * Specifies how tasks should be distributed across compute nodes. If not - * specified, the default is spread. - */ - @JsonProperty(value = "taskSchedulingPolicy") - private TaskSchedulingPolicy taskSchedulingPolicy; - - /* - * The list of user accounts to be created on each node in the pool. - */ - @JsonProperty(value = "userAccounts") - private List userAccounts; - - /* - * A list of name-value pairs associated with the pool as metadata. The - * Batch service does not assign any meaning to metadata; it is solely for - * the use of user code. - */ - @JsonProperty(value = "metadata") - private List metadata; - - /* - * A task which is run when a compute node joins a pool in the Azure Batch - * service, or when the compute node is rebooted or reimaged. In an PATCH - * (update) operation, this property can be set to an empty object to - * remove the start task from the pool. - */ - @JsonProperty(value = "startTask") - private StartTask startTask; - - /* - * The list of certificates to be installed on each compute node in the - * pool. For Windows compute nodes, the Batch service installs the - * certificates to the specified certificate store and location. For Linux - * compute nodes, the certificates are stored in a directory inside the - * task working directory and an environment variable - * AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this - * location. For certificates with visibility of 'remoteUser', a 'certs' - * directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - */ - @JsonProperty(value = "certificates") - private List certificates; - - /* - * The list of application packages to be installed on each compute node in - * the pool. Changes to application package references affect all new - * compute nodes joining the pool, but do not affect compute nodes that are - * already in the pool until they are rebooted or reimaged. There is a - * maximum of 10 application package references on any given pool. - */ - @JsonProperty(value = "applicationPackages") - private List applicationPackages; - - /* - * The list of application licenses the Batch service will make available - * on each compute node in the pool. The list of application licenses must - * be a subset of available Batch service application licenses. If a - * license is requested which is not supported, pool creation will fail. - */ - @JsonProperty(value = "applicationLicenses") - private List applicationLicenses; - - /* - * Details about the current or last completed resize operation. Describes - * either the current operation (if the pool AllocationState is Resizing) - * or the previously completed operation (if the AllocationState is - * Steady). - */ - @JsonProperty(value = "resizeOperationStatus", access = JsonProperty.Access.WRITE_ONLY) - private ResizeOperationStatus resizeOperationStatus; - - /* - * A list of file systems to mount on each node in the pool. This supports - * Azure Files, NFS, CIFS/SMB, and Blobfuse. - */ - @JsonProperty(value = "mountConfiguration") - private List mountConfiguration; - - /** - * Get the displayName property: The display name for the pool. The display name need not be unique and can contain - * any Unicode characters up to a maximum length of 1024. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name for the pool. The display name need not be unique and can contain - * any Unicode characters up to a maximum length of 1024. - * - * @param displayName the displayName value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the lastModified property: The last modified time of the pool. This is the last time at which the pool level - * data, such as the targetDedicatedNodes or autoScaleSettings, changed. It does not factor in node-level changes - * such as a compute node changing state. - * - * @return the lastModified value. - */ - public OffsetDateTime lastModified() { - return this.lastModified; - } - - /** - * Get the creationTime property: The creation time of the pool. - * - * @return the creationTime value. - */ - public OffsetDateTime creationTime() { - return this.creationTime; - } - - /** - * Get the provisioningState property: The current state of the pool. - * - * @return the provisioningState value. - */ - public PoolProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the provisioningStateTransitionTime property: The time at which the pool entered its current state. - * - * @return the provisioningStateTransitionTime value. - */ - public OffsetDateTime provisioningStateTransitionTime() { - return this.provisioningStateTransitionTime; - } - - /** - * Get the allocationState property: Whether the pool is resizing. - * - * @return the allocationState value. - */ - public AllocationState allocationState() { - return this.allocationState; - } - - /** - * Get the allocationStateTransitionTime property: The time at which the pool entered its current allocation state. - * - * @return the allocationStateTransitionTime value. - */ - public OffsetDateTime allocationStateTransitionTime() { - return this.allocationStateTransitionTime; - } - - /** - * Get the vmSize property: The size of virtual machines in the pool. All VMs in a pool are the same size. For - * information about available sizes of virtual machines for Cloud Services pools (pools created with - * cloudServiceConfiguration), see Sizes for Cloud Services - * (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud - * Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the - * Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines - * (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual - * Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch - * supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and - * STANDARD_DSV2 series). - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: The size of virtual machines in the pool. All VMs in a pool are the same size. For - * information about available sizes of virtual machines for Cloud Services pools (pools created with - * cloudServiceConfiguration), see Sizes for Cloud Services - * (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud - * Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the - * Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines - * (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual - * Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch - * supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and - * STANDARD_DSV2 series). - * - * @param vmSize the vmSize value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the deploymentConfiguration property: Deployment configuration properties. Using CloudServiceConfiguration - * specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration - * uses Azure Virtual Machines (IaaS). - * - * @return the deploymentConfiguration value. - */ - public DeploymentConfiguration deploymentConfiguration() { - return this.deploymentConfiguration; - } - - /** - * Set the deploymentConfiguration property: Deployment configuration properties. Using CloudServiceConfiguration - * specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration - * uses Azure Virtual Machines (IaaS). - * - * @param deploymentConfiguration the deploymentConfiguration value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration) { - this.deploymentConfiguration = deploymentConfiguration; - return this; - } - - /** - * Get the currentDedicatedNodes property: The number of compute nodes currently in the pool. - * - * @return the currentDedicatedNodes value. - */ - public Integer currentDedicatedNodes() { - return this.currentDedicatedNodes; - } - - /** - * Get the currentLowPriorityNodes property: The number of low-priority compute nodes currently in the pool. - * - * @return the currentLowPriorityNodes value. - */ - public Integer currentLowPriorityNodes() { - return this.currentLowPriorityNodes; - } - - /** - * Get the scaleSettings property: Scale settings for the pool Defines the desired size of the pool. This can either - * be 'fixedScale' where the requested targetDedicatedNodes is specified, or 'autoScale' which defines a formula - * which is periodically reevaluated. If this property is not specified, the pool will have a fixed scale with 0 - * targetDedicatedNodes. - * - * @return the scaleSettings value. - */ - public ScaleSettings scaleSettings() { - return this.scaleSettings; - } - - /** - * Set the scaleSettings property: Scale settings for the pool Defines the desired size of the pool. This can either - * be 'fixedScale' where the requested targetDedicatedNodes is specified, or 'autoScale' which defines a formula - * which is periodically reevaluated. If this property is not specified, the pool will have a fixed scale with 0 - * targetDedicatedNodes. - * - * @param scaleSettings the scaleSettings value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withScaleSettings(ScaleSettings scaleSettings) { - this.scaleSettings = scaleSettings; - return this; - } - - /** - * Get the autoScaleRun property: The results and errors from an execution of a pool autoscale formula. This - * property is set only if the pool automatically scales, i.e. autoScaleSettings are used. - * - * @return the autoScaleRun value. - */ - public AutoScaleRun autoScaleRun() { - return this.autoScaleRun; - } - - /** - * Get the interNodeCommunication property: Whether the pool permits direct communication between nodes. This - * imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the - * requested number of nodes to be allocated in the pool. If not specified, this value defaults to 'Disabled'. - * - * @return the interNodeCommunication value. - */ - public InterNodeCommunicationState interNodeCommunication() { - return this.interNodeCommunication; - } - - /** - * Set the interNodeCommunication property: Whether the pool permits direct communication between nodes. This - * imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the - * requested number of nodes to be allocated in the pool. If not specified, this value defaults to 'Disabled'. - * - * @param interNodeCommunication the interNodeCommunication value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withInterNodeCommunication(InterNodeCommunicationState interNodeCommunication) { - this.interNodeCommunication = interNodeCommunication; - return this; - } - - /** - * Get the networkConfiguration property: The network configuration for a pool. - * - * @return the networkConfiguration value. - */ - public NetworkConfiguration networkConfiguration() { - return this.networkConfiguration; - } - - /** - * Set the networkConfiguration property: The network configuration for a pool. - * - * @param networkConfiguration the networkConfiguration value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withNetworkConfiguration(NetworkConfiguration networkConfiguration) { - this.networkConfiguration = networkConfiguration; - return this; - } - - /** - * Get the taskSlotsPerNode property: The number of task slots that can be used to run concurrent tasks on a single - * compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores - * of the vmSize of the pool or 256. - * - * @return the taskSlotsPerNode value. - */ - public Integer taskSlotsPerNode() { - return this.taskSlotsPerNode; - } - - /** - * Set the taskSlotsPerNode property: The number of task slots that can be used to run concurrent tasks on a single - * compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores - * of the vmSize of the pool or 256. - * - * @param taskSlotsPerNode the taskSlotsPerNode value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withTaskSlotsPerNode(Integer taskSlotsPerNode) { - this.taskSlotsPerNode = taskSlotsPerNode; - return this; - } - - /** - * Get the taskSchedulingPolicy property: Specifies how tasks should be distributed across compute nodes. If not - * specified, the default is spread. - * - * @return the taskSchedulingPolicy value. - */ - public TaskSchedulingPolicy taskSchedulingPolicy() { - return this.taskSchedulingPolicy; - } - - /** - * Set the taskSchedulingPolicy property: Specifies how tasks should be distributed across compute nodes. If not - * specified, the default is spread. - * - * @param taskSchedulingPolicy the taskSchedulingPolicy value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withTaskSchedulingPolicy(TaskSchedulingPolicy taskSchedulingPolicy) { - this.taskSchedulingPolicy = taskSchedulingPolicy; - return this; - } - - /** - * Get the userAccounts property: The list of user accounts to be created on each node in the pool. - * - * @return the userAccounts value. - */ - public List userAccounts() { - return this.userAccounts; - } - - /** - * Set the userAccounts property: The list of user accounts to be created on each node in the pool. - * - * @param userAccounts the userAccounts value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withUserAccounts(List userAccounts) { - this.userAccounts = userAccounts; - return this; - } - - /** - * Get the metadata property: A list of name-value pairs associated with the pool as metadata. The Batch service - * does not assign any meaning to metadata; it is solely for the use of user code. - * - * @return the metadata value. - */ - public List metadata() { - return this.metadata; - } - - /** - * Set the metadata property: A list of name-value pairs associated with the pool as metadata. The Batch service - * does not assign any meaning to metadata; it is solely for the use of user code. - * - * @param metadata the metadata value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withMetadata(List metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the startTask property: A task which is run when a compute node joins a pool in the Azure Batch service, or - * when the compute node is rebooted or reimaged. In an PATCH (update) operation, this property can be set to an - * empty object to remove the start task from the pool. - * - * @return the startTask value. - */ - public StartTask startTask() { - return this.startTask; - } - - /** - * Set the startTask property: A task which is run when a compute node joins a pool in the Azure Batch service, or - * when the compute node is rebooted or reimaged. In an PATCH (update) operation, this property can be set to an - * empty object to remove the start task from the pool. - * - * @param startTask the startTask value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withStartTask(StartTask startTask) { - this.startTask = startTask; - return this; - } - - /** - * Get the certificates property: The list of certificates to be installed on each compute node in the pool. For - * Windows compute nodes, the Batch service installs the certificates to the specified certificate store and - * location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory - * and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For - * certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * - * @return the certificates value. - */ - public List certificates() { - return this.certificates; - } - - /** - * Set the certificates property: The list of certificates to be installed on each compute node in the pool. For - * Windows compute nodes, the Batch service installs the certificates to the specified certificate store and - * location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory - * and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For - * certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * - * @param certificates the certificates value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withCertificates(List certificates) { - this.certificates = certificates; - return this; - } - - /** - * Get the applicationPackages property: The list of application packages to be installed on each compute node in - * the pool. Changes to application package references affect all new compute nodes joining the pool, but do not - * affect compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 - * application package references on any given pool. - * - * @return the applicationPackages value. - */ - public List applicationPackages() { - return this.applicationPackages; - } - - /** - * Set the applicationPackages property: The list of application packages to be installed on each compute node in - * the pool. Changes to application package references affect all new compute nodes joining the pool, but do not - * affect compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 - * application package references on any given pool. - * - * @param applicationPackages the applicationPackages value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withApplicationPackages(List applicationPackages) { - this.applicationPackages = applicationPackages; - return this; - } - - /** - * Get the applicationLicenses property: The list of application licenses the Batch service will make available on - * each compute node in the pool. The list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool creation will fail. - * - * @return the applicationLicenses value. - */ - public List applicationLicenses() { - return this.applicationLicenses; - } - - /** - * Set the applicationLicenses property: The list of application licenses the Batch service will make available on - * each compute node in the pool. The list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool creation will fail. - * - * @param applicationLicenses the applicationLicenses value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withApplicationLicenses(List applicationLicenses) { - this.applicationLicenses = applicationLicenses; - return this; - } - - /** - * Get the resizeOperationStatus property: Details about the current or last completed resize operation. Describes - * either the current operation (if the pool AllocationState is Resizing) or the previously completed operation (if - * the AllocationState is Steady). - * - * @return the resizeOperationStatus value. - */ - public ResizeOperationStatus resizeOperationStatus() { - return this.resizeOperationStatus; - } - - /** - * Get the mountConfiguration property: A list of file systems to mount on each node in the pool. This supports - * Azure Files, NFS, CIFS/SMB, and Blobfuse. - * - * @return the mountConfiguration value. - */ - public List mountConfiguration() { - return this.mountConfiguration; - } - - /** - * Set the mountConfiguration property: A list of file systems to mount on each node in the pool. This supports - * Azure Files, NFS, CIFS/SMB, and Blobfuse. - * - * @param mountConfiguration the mountConfiguration value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withMountConfiguration(List mountConfiguration) { - this.mountConfiguration = mountConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (deploymentConfiguration() != null) { - deploymentConfiguration().validate(); - } - if (scaleSettings() != null) { - scaleSettings().validate(); - } - if (autoScaleRun() != null) { - autoScaleRun().validate(); - } - if (networkConfiguration() != null) { - networkConfiguration().validate(); - } - if (taskSchedulingPolicy() != null) { - taskSchedulingPolicy().validate(); - } - if (userAccounts() != null) { - userAccounts().forEach(e -> e.validate()); - } - if (metadata() != null) { - metadata().forEach(e -> e.validate()); - } - if (startTask() != null) { - startTask().validate(); - } - if (certificates() != null) { - certificates().forEach(e -> e.validate()); - } - if (applicationPackages() != null) { - applicationPackages().forEach(e -> e.validate()); - } - if (resizeOperationStatus() != null) { - resizeOperationStatus().validate(); - } - if (mountConfiguration() != null) { - mountConfiguration().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateEndpointConnectionInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateEndpointConnectionInner.java index a052867ca4e9..77fe26e423ae 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateEndpointConnectionInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.batch.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.batch.models.PrivateEndpoint; @@ -14,39 +15,35 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** Contains information about a private link resource. */ +@JsonFlatten @Fluent -public final class PrivateEndpointConnectionInner extends ProxyResource { +public class PrivateEndpointConnectionInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class); /* - * The properties associated with the private endpoint connection. + * The provisioning state of the private endpoint connection. */ - @JsonProperty(value = "properties") - private PrivateEndpointConnectionProperties innerProperties; + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PrivateEndpointConnectionProvisioningState provisioningState; /* - * The ETag of the resource, used for concurrency statements. + * The private endpoint of the private endpoint connection. */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; + @JsonProperty(value = "properties.privateEndpoint") + private PrivateEndpoint privateEndpoint; - /** - * Get the innerProperties property: The properties associated with the private endpoint connection. - * - * @return the innerProperties value. + /* + * The private link service connection state of the private endpoint + * connection */ - private PrivateEndpointConnectionProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.privateLinkServiceConnectionState") + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; - /** - * Get the etag property: The ETag of the resource, used for concurrency statements. - * - * @return the etag value. + /* + * The ETag of the resource, used for concurrency statements. */ - public String etag() { - return this.etag; - } + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; /** * Get the provisioningState property: The provisioning state of the private endpoint connection. @@ -54,7 +51,7 @@ public String etag() { * @return the provisioningState value. */ public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -63,7 +60,7 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { * @return the privateEndpoint value. */ public PrivateEndpoint privateEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); + return this.privateEndpoint; } /** @@ -73,10 +70,7 @@ public PrivateEndpoint privateEndpoint() { * @return the PrivateEndpointConnectionInner object itself. */ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateEndpoint(privateEndpoint); + this.privateEndpoint = privateEndpoint; return this; } @@ -87,7 +81,7 @@ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privat * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); + return this.privateLinkServiceConnectionState; } /** @@ -99,21 +93,30 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { */ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; return this; } + /** + * Get the etag property: The ETag of the resource, used for concurrency statements. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() != null) { + privateLinkServiceConnectionState().validate(); } } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateEndpointConnectionProperties.java deleted file mode 100644 index e5ab7c607db3..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateEndpointConnectionProperties.java +++ /dev/null @@ -1,104 +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.batch.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batch.models.PrivateEndpoint; -import com.azure.resourcemanager.batch.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Private endpoint connection properties. */ -@Fluent -public final class PrivateEndpointConnectionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionProperties.class); - - /* - * The provisioning state of the private endpoint connection. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private PrivateEndpointConnectionProvisioningState provisioningState; - - /* - * The private endpoint of the private endpoint connection. - */ - @JsonProperty(value = "privateEndpoint") - private PrivateEndpoint privateEndpoint; - - /* - * The private link service connection state of the private endpoint - * connection - */ - @JsonProperty(value = "privateLinkServiceConnectionState") - private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; - - /** - * Get the provisioningState property: The provisioning state of the private endpoint connection. - * - * @return the provisioningState value. - */ - public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the privateEndpoint property: The private endpoint of the private endpoint connection. - * - * @return the privateEndpoint value. - */ - public PrivateEndpoint privateEndpoint() { - return this.privateEndpoint; - } - - /** - * Set the privateEndpoint property: The private endpoint of the private endpoint connection. - * - * @param privateEndpoint the privateEndpoint value to set. - * @return the PrivateEndpointConnectionProperties object itself. - */ - public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.privateEndpoint = privateEndpoint; - return this; - } - - /** - * Get the privateLinkServiceConnectionState property: The private link service connection state of the private - * endpoint connection. - * - * @return the privateLinkServiceConnectionState value. - */ - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.privateLinkServiceConnectionState; - } - - /** - * Set the privateLinkServiceConnectionState property: The private link service connection state of the private - * endpoint connection. - * - * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. - * @return the PrivateEndpointConnectionProperties object itself. - */ - public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() != null) { - privateLinkServiceConnectionState().validate(); - } - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateLinkResourceInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateLinkResourceInner.java index 4420968baf21..bb81ec36285a 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateLinkResourceInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateLinkResourceInner.java @@ -4,7 +4,8 @@ package com.azure.resourcemanager.batch.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -12,39 +13,36 @@ import java.util.List; /** Contains information about a private link resource. */ -@Fluent -public final class PrivateLinkResourceInner extends ProxyResource { +@JsonFlatten +@Immutable +public class PrivateLinkResourceInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceInner.class); /* - * The properties associated with the private link resource. + * The group id of the private link resource. The group id is used to + * establish the private link connection. */ - @JsonProperty(value = "properties") - private PrivateLinkResourceProperties innerProperties; + @JsonProperty(value = "properties.groupId", access = JsonProperty.Access.WRITE_ONLY) + private String groupId; /* - * The ETag of the resource, used for concurrency statements. + * The list of required members that are used to establish the private link + * connection. */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; + @JsonProperty(value = "properties.requiredMembers", access = JsonProperty.Access.WRITE_ONLY) + private List requiredMembers; - /** - * Get the innerProperties property: The properties associated with the private link resource. - * - * @return the innerProperties value. + /* + * The list of required zone names for the private DNS resource name */ - private PrivateLinkResourceProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.requiredZoneNames", access = JsonProperty.Access.WRITE_ONLY) + private List requiredZoneNames; - /** - * Get the etag property: The ETag of the resource, used for concurrency statements. - * - * @return the etag value. + /* + * The ETag of the resource, used for concurrency statements. */ - public String etag() { - return this.etag; - } + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; /** * Get the groupId property: The group id of the private link resource. The group id is used to establish the @@ -53,7 +51,7 @@ public String etag() { * @return the groupId value. */ public String groupId() { - return this.innerProperties() == null ? null : this.innerProperties().groupId(); + return this.groupId; } /** @@ -63,7 +61,7 @@ public String groupId() { * @return the requiredMembers value. */ public List requiredMembers() { - return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); + return this.requiredMembers; } /** @@ -72,7 +70,16 @@ public List requiredMembers() { * @return the requiredZoneNames value. */ public List requiredZoneNames() { - return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); + return this.requiredZoneNames; + } + + /** + * Get the etag property: The ETag of the resource, used for concurrency statements. + * + * @return the etag value. + */ + public String etag() { + return this.etag; } /** @@ -81,8 +88,5 @@ public List requiredZoneNames() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateLinkResourceProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateLinkResourceProperties.java deleted file mode 100644 index 3fc2061a0822..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateLinkResourceProperties.java +++ /dev/null @@ -1,74 +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.batch.fluent.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; -import java.util.List; - -/** Private link resource properties. */ -@Immutable -public final class PrivateLinkResourceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceProperties.class); - - /* - * The group id of the private link resource. The group id is used to - * establish the private link connection. - */ - @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY) - private String groupId; - - /* - * The list of required members that are used to establish the private link - * connection. - */ - @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY) - private List requiredMembers; - - /* - * The list of required zone names for the private DNS resource name - */ - @JsonProperty(value = "requiredZoneNames", access = JsonProperty.Access.WRITE_ONLY) - private List requiredZoneNames; - - /** - * Get the groupId property: The group id of the private link resource. The group id is used to establish the - * private link connection. - * - * @return the groupId value. - */ - public String groupId() { - return this.groupId; - } - - /** - * Get the requiredMembers property: The list of required members that are used to establish the private link - * connection. - * - * @return the requiredMembers value. - */ - public List requiredMembers() { - return this.requiredMembers; - } - - /** - * Get the requiredZoneNames property: The list of required zone names for the private DNS resource name. - * - * @return the requiredZoneNames value. - */ - public List requiredZoneNames() { - return this.requiredZoneNames; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/package-info.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/package-info.java index 84e1c03ace96..3349317527bf 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/package-info.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/package-info.java @@ -2,5 +2,5 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the inner data models for BatchManagement. null. */ +/** Package containing the inner data models for BatchManagementClient. Batch Client. */ package com.azure.resourcemanager.batch.fluent.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/package-info.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/package-info.java index 9dd56b992022..a4747ad952c9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/package-info.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/package-info.java @@ -2,5 +2,5 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the service clients for BatchManagement. null. */ +/** Package containing the service clients for BatchManagementClient. Batch Client. */ package com.azure.resourcemanager.batch.fluent; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationImpl.java index e0d83b6bdbb7..80cf1c0fce0c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationImpl.java @@ -25,10 +25,6 @@ public String type() { return this.innerModel().type(); } - public String etag() { - return this.innerModel().etag(); - } - public String displayName() { return this.innerModel().displayName(); } @@ -41,6 +37,10 @@ public String defaultVersion() { return this.innerModel().defaultVersion(); } + public String etag() { + return this.innerModel().etag(); + } + public ApplicationInner innerModel() { return this.innerObject; } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackageImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackageImpl.java index 632f8bd304f6..40a13b2a656a 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackageImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackageImpl.java @@ -35,10 +35,6 @@ public String type() { return this.innerModel().type(); } - public String etag() { - return this.innerModel().etag(); - } - public PackageState state() { return this.innerModel().state(); } @@ -59,6 +55,10 @@ public OffsetDateTime lastActivationTime() { return this.innerModel().lastActivationTime(); } + public String etag() { + return this.innerModel().etag(); + } + public ApplicationPackageInner innerModel() { return this.innerObject; } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesClientImpl.java index c734776fe44f..7a324a6a93d4 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesClientImpl.java @@ -44,25 +44,25 @@ public final class ApplicationPackagesClientImpl implements ApplicationPackagesC private final ApplicationPackagesService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of ApplicationPackagesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ApplicationPackagesClientImpl(BatchManagementImpl client) { + ApplicationPackagesClientImpl(BatchManagementClientImpl client) { this.service = RestProxy.create(ApplicationPackagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for BatchManagementApplicationPackages to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for BatchManagementClientApplicationPackages to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementAppli") + @ServiceInterface(name = "BatchManagementClien") private interface ApplicationPackagesService { @Headers({"Content-Type: application/json"}) @Post( diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsClientImpl.java index e956e2b0f53a..854bb63ae10b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsClientImpl.java @@ -43,25 +43,25 @@ public final class ApplicationsClientImpl implements ApplicationsClient { private final ApplicationsService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of ApplicationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ApplicationsClientImpl(BatchManagementImpl client) { + ApplicationsClientImpl(BatchManagementClientImpl client) { this.service = RestProxy.create(ApplicationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for BatchManagementApplications to be used by the proxy service to + * The interface defining all the services for BatchManagementClientApplications to be used by the proxy service to * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementAppli") + @ServiceInterface(name = "BatchManagementClien") private interface ApplicationsService { @Headers({"Content-Type: application/json"}) @Put( diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsClientImpl.java index e5fd98147bb6..48b1eccb90e4 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsClientImpl.java @@ -55,25 +55,25 @@ public final class BatchAccountsClientImpl implements BatchAccountsClient { private final BatchAccountsService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of BatchAccountsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BatchAccountsClientImpl(BatchManagementImpl client) { + BatchAccountsClientImpl(BatchManagementClientImpl client) { this.service = RestProxy.create(BatchAccountsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for BatchManagementBatchAccounts to be used by the proxy service to + * The interface defining all the services for BatchManagementClientBatchAccounts to be used by the proxy service to * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementBatch") + @ServiceInterface(name = "BatchManagementClien") private interface BatchAccountsService { @Headers({"Content-Type: application/json"}) @Put( diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementBuilder.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientBuilder.java similarity index 74% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementBuilder.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientBuilder.java index 4330caf2ccbc..b8c93ae89743 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementBuilder.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientBuilder.java @@ -15,9 +15,9 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the BatchManagementImpl type. */ -@ServiceClientBuilder(serviceClients = {BatchManagementImpl.class}) -public final class BatchManagementBuilder { +/** A builder for creating a new instance of the BatchManagementClientImpl type. */ +@ServiceClientBuilder(serviceClients = {BatchManagementClientImpl.class}) +public final class BatchManagementClientBuilder { /* * The Azure subscription ID. This is a GUID-formatted string (e.g. * 00000000-0000-0000-0000-000000000000) @@ -28,9 +28,9 @@ public final class BatchManagementBuilder { * Sets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). * * @param subscriptionId the subscriptionId value. - * @return the BatchManagementBuilder. + * @return the BatchManagementClientBuilder. */ - public BatchManagementBuilder subscriptionId(String subscriptionId) { + public BatchManagementClientBuilder subscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; } @@ -44,9 +44,9 @@ public BatchManagementBuilder subscriptionId(String subscriptionId) { * Sets server parameter. * * @param endpoint the endpoint value. - * @return the BatchManagementBuilder. + * @return the BatchManagementClientBuilder. */ - public BatchManagementBuilder endpoint(String endpoint) { + public BatchManagementClientBuilder endpoint(String endpoint) { this.endpoint = endpoint; return this; } @@ -60,9 +60,9 @@ public BatchManagementBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the BatchManagementBuilder. + * @return the BatchManagementClientBuilder. */ - public BatchManagementBuilder environment(AzureEnvironment environment) { + public BatchManagementClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -76,9 +76,9 @@ public BatchManagementBuilder environment(AzureEnvironment environment) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the BatchManagementBuilder. + * @return the BatchManagementClientBuilder. */ - public BatchManagementBuilder defaultPollInterval(Duration defaultPollInterval) { + public BatchManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -92,9 +92,9 @@ public BatchManagementBuilder defaultPollInterval(Duration defaultPollInterval) * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the BatchManagementBuilder. + * @return the BatchManagementClientBuilder. */ - public BatchManagementBuilder pipeline(HttpPipeline pipeline) { + public BatchManagementClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -108,19 +108,19 @@ public BatchManagementBuilder pipeline(HttpPipeline pipeline) { * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the BatchManagementBuilder. + * @return the BatchManagementClientBuilder. */ - public BatchManagementBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public BatchManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of BatchManagementImpl with the provided parameters. + * Builds an instance of BatchManagementClientImpl with the provided parameters. * - * @return an instance of BatchManagementImpl. + * @return an instance of BatchManagementClientImpl. */ - public BatchManagementImpl buildClient() { + public BatchManagementClientImpl buildClient() { if (endpoint == null) { this.endpoint = "https://management.azure.com"; } @@ -139,8 +139,8 @@ public BatchManagementImpl buildClient() { if (serializerAdapter == null) { this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); } - BatchManagementImpl client = - new BatchManagementImpl( + BatchManagementClientImpl client = + new BatchManagementClientImpl( pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); return client; } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java similarity index 97% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementImpl.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java index d393afe132cc..26f3d993d70b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java @@ -24,7 +24,7 @@ import com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient; import com.azure.resourcemanager.batch.fluent.ApplicationsClient; import com.azure.resourcemanager.batch.fluent.BatchAccountsClient; -import com.azure.resourcemanager.batch.fluent.BatchManagement; +import com.azure.resourcemanager.batch.fluent.BatchManagementClient; import com.azure.resourcemanager.batch.fluent.CertificatesClient; import com.azure.resourcemanager.batch.fluent.LocationsClient; import com.azure.resourcemanager.batch.fluent.OperationsClient; @@ -41,10 +41,10 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the BatchManagementImpl type. */ -@ServiceClient(builder = BatchManagementBuilder.class) -public final class BatchManagementImpl implements BatchManagement { - private final ClientLogger logger = new ClientLogger(BatchManagementImpl.class); +/** Initializes a new instance of the BatchManagementClientImpl type. */ +@ServiceClient(builder = BatchManagementClientBuilder.class) +public final class BatchManagementClientImpl implements BatchManagementClient { + private final ClientLogger logger = new ClientLogger(BatchManagementClientImpl.class); /** The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). */ private final String subscriptionId; @@ -227,7 +227,7 @@ public PoolsClient getPools() { } /** - * Initializes an instance of BatchManagement client. + * Initializes an instance of BatchManagementClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. @@ -237,7 +237,7 @@ public PoolsClient getPools() { * 00000000-0000-0000-0000-000000000000). * @param endpoint server parameter. */ - BatchManagementImpl( + BatchManagementClientImpl( HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificateImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificateImpl.java index 27e2e73c8edc..5734f7b52872 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificateImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificateImpl.java @@ -31,8 +31,16 @@ public String type() { return this.innerModel().type(); } - public String etag() { - return this.innerModel().etag(); + public String thumbprintAlgorithm() { + return this.innerModel().thumbprintAlgorithm(); + } + + public String thumbprint() { + return this.innerModel().thumbprint(); + } + + public CertificateFormat format() { + return this.innerModel().format(); } public CertificateProvisioningState provisioningState() { @@ -59,16 +67,8 @@ public DeleteCertificateError deleteCertificateError() { return this.innerModel().deleteCertificateError(); } - public String thumbprintAlgorithm() { - return this.innerModel().thumbprintAlgorithm(); - } - - public String thumbprint() { - return this.innerModel().thumbprint(); - } - - public CertificateFormat format() { - return this.innerModel().format(); + public String etag() { + return this.innerModel().etag(); } public CertificateInner innerModel() { @@ -210,52 +210,52 @@ public Response cancelDeletionWithResponse(Context context) { .cancelDeletionWithResponse(resourceGroupName, accountName, certificateName, context); } - public CertificateImpl withData(String data) { + public CertificateImpl withThumbprintAlgorithm(String thumbprintAlgorithm) { if (isInCreateMode()) { - this.createParameters.withData(data); + this.createParameters.withThumbprintAlgorithm(thumbprintAlgorithm); return this; } else { - this.updateParameters.withData(data); + this.updateParameters.withThumbprintAlgorithm(thumbprintAlgorithm); return this; } } - public CertificateImpl withPassword(String password) { + public CertificateImpl withThumbprint(String thumbprint) { if (isInCreateMode()) { - this.createParameters.withPassword(password); + this.createParameters.withThumbprint(thumbprint); return this; } else { - this.updateParameters.withPassword(password); + this.updateParameters.withThumbprint(thumbprint); return this; } } - public CertificateImpl withThumbprintAlgorithm(String thumbprintAlgorithm) { + public CertificateImpl withFormat(CertificateFormat format) { if (isInCreateMode()) { - this.createParameters.withThumbprintAlgorithm(thumbprintAlgorithm); + this.createParameters.withFormat(format); return this; } else { - this.updateParameters.withThumbprintAlgorithm(thumbprintAlgorithm); + this.updateParameters.withFormat(format); return this; } } - public CertificateImpl withThumbprint(String thumbprint) { + public CertificateImpl withData(String data) { if (isInCreateMode()) { - this.createParameters.withThumbprint(thumbprint); + this.createParameters.withData(data); return this; } else { - this.updateParameters.withThumbprint(thumbprint); + this.updateParameters.withData(data); return this; } } - public CertificateImpl withFormat(CertificateFormat format) { + public CertificateImpl withPassword(String password) { if (isInCreateMode()) { - this.createParameters.withFormat(format); + this.createParameters.withPassword(password); return this; } else { - this.updateParameters.withFormat(format); + this.updateParameters.withPassword(password); return this; } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesClientImpl.java index d45f0cfd7c4c..a9e47e17c3cd 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesClientImpl.java @@ -54,25 +54,25 @@ public final class CertificatesClientImpl implements CertificatesClient { private final CertificatesService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of CertificatesClientImpl. * * @param client the instance of the service client containing this operation class. */ - CertificatesClientImpl(BatchManagementImpl client) { + CertificatesClientImpl(BatchManagementClientImpl client) { this.service = RestProxy.create(CertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for BatchManagementCertificates to be used by the proxy service to + * The interface defining all the services for BatchManagementClientCertificates to be used by the proxy service to * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementCerti") + @ServiceInterface(name = "BatchManagementClien") private interface CertificatesService { @Headers({"Content-Type: application/json"}) @Get( diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/LocationsClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/LocationsClientImpl.java index f9e768ebd91e..c56ba4918149 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/LocationsClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/LocationsClientImpl.java @@ -44,25 +44,25 @@ public final class LocationsClientImpl implements LocationsClient { private final LocationsService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of LocationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - LocationsClientImpl(BatchManagementImpl client) { + LocationsClientImpl(BatchManagementClientImpl client) { this.service = RestProxy.create(LocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for BatchManagementLocations to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for BatchManagementClientLocations to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementLocat") + @ServiceInterface(name = "BatchManagementClien") private interface LocationsService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/quotas") diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationsClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationsClientImpl.java index c415fb2aeaa2..003fbc1790a6 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationsClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationsClientImpl.java @@ -39,25 +39,25 @@ public final class OperationsClientImpl implements OperationsClient { private final OperationsService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(BatchManagementImpl client) { + OperationsClientImpl(BatchManagementClientImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for BatchManagementOperations to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for BatchManagementClientOperations to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementOpera") + @ServiceInterface(name = "BatchManagementClien") private interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.Batch/operations") diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolImpl.java index e6029187b779..72d4999408d4 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolImpl.java @@ -49,10 +49,6 @@ public BatchPoolIdentity identity() { return this.innerModel().identity(); } - public String etag() { - return this.innerModel().etag(); - } - public String displayName() { return this.innerModel().displayName(); } @@ -183,6 +179,10 @@ public List mountConfiguration() { } } + public String etag() { + return this.innerModel().etag(); + } + public PoolInner innerModel() { return this.innerObject; } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolsClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolsClientImpl.java index a9e753cd3e17..52150ed153b4 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolsClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolsClientImpl.java @@ -54,24 +54,24 @@ public final class PoolsClientImpl implements PoolsClient { private final PoolsService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of PoolsClientImpl. * * @param client the instance of the service client containing this operation class. */ - PoolsClientImpl(BatchManagementImpl client) { + PoolsClientImpl(BatchManagementClientImpl client) { this.service = RestProxy.create(PoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for BatchManagementPools to be used by the proxy service to perform REST - * calls. + * The interface defining all the services for BatchManagementClientPools to be used by the proxy service to perform + * REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementPools") + @ServiceInterface(name = "BatchManagementClien") private interface PoolsService { @Headers({"Content-Type: application/json"}) @Get( diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionImpl.java index 39923cff73b9..bd07f0333233 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionImpl.java @@ -33,10 +33,6 @@ public String type() { return this.innerModel().type(); } - public String etag() { - return this.innerModel().etag(); - } - public PrivateEndpointConnectionProvisioningState provisioningState() { return this.innerModel().provisioningState(); } @@ -49,6 +45,10 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { return this.innerModel().privateLinkServiceConnectionState(); } + public String etag() { + return this.innerModel().etag(); + } + public PrivateEndpointConnectionInner innerModel() { return this.innerObject; } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsClientImpl.java index cb017f5c6753..828e101e53a4 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsClientImpl.java @@ -46,14 +46,14 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi private final PrivateEndpointConnectionsService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of PrivateEndpointConnectionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - PrivateEndpointConnectionsClientImpl(BatchManagementImpl client) { + PrivateEndpointConnectionsClientImpl(BatchManagementClientImpl client) { this.service = RestProxy .create( @@ -62,11 +62,11 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi } /** - * The interface defining all the services for BatchManagementPrivateEndpointConnections to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for BatchManagementClientPrivateEndpointConnections to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementPriva") + @ServiceInterface(name = "BatchManagementClien") private interface PrivateEndpointConnectionsService { @Headers({"Content-Type: application/json"}) @Get( diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourceImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourceImpl.java index 787fdf469d5c..1575422ea82d 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourceImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourceImpl.java @@ -32,10 +32,6 @@ public String type() { return this.innerModel().type(); } - public String etag() { - return this.innerModel().etag(); - } - public String groupId() { return this.innerModel().groupId(); } @@ -58,6 +54,10 @@ public List requiredZoneNames() { } } + public String etag() { + return this.innerModel().etag(); + } + public PrivateLinkResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesClientImpl.java index b0ef5dde4877..9c7836e5e53d 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesClientImpl.java @@ -39,14 +39,14 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource private final PrivateLinkResourcesService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of PrivateLinkResourcesClientImpl. * * @param client the instance of the service client containing this operation class. */ - PrivateLinkResourcesClientImpl(BatchManagementImpl client) { + PrivateLinkResourcesClientImpl(BatchManagementClientImpl client) { this.service = RestProxy .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); @@ -54,11 +54,11 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource } /** - * The interface defining all the services for BatchManagementPrivateLinkResources to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for BatchManagementClientPrivateLinkResources to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementPriva") + @ServiceInterface(name = "BatchManagementClien") private interface PrivateLinkResourcesService { @Headers({"Content-Type: application/json"}) @Get( diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/package-info.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/package-info.java index 744890726c4d..4aff45e58c3b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/package-info.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/package-info.java @@ -2,5 +2,5 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the implementations for BatchManagement. null. */ +/** Package containing the implementations for BatchManagementClient. Batch Client. */ package com.azure.resourcemanager.batch.implementation; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Application.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Application.java index 1349913ca536..a425fd7ddc43 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Application.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Application.java @@ -30,13 +30,6 @@ public interface Application { */ String type(); - /** - * Gets the etag property: The ETag of the resource, used for concurrency statements. - * - * @return the etag value. - */ - String etag(); - /** * Gets the displayName property: The display name for the application. * @@ -60,6 +53,13 @@ public interface Application { */ String defaultVersion(); + /** + * Gets the etag property: The ETag of the resource, used for concurrency statements. + * + * @return the etag value. + */ + String etag(); + /** * Gets the inner com.azure.resourcemanager.batch.fluent.models.ApplicationInner object. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackage.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackage.java index cc0c6de3def0..7f66db9bb355 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackage.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackage.java @@ -32,13 +32,6 @@ public interface ApplicationPackage { */ String type(); - /** - * Gets the etag property: The ETag of the resource, used for concurrency statements. - * - * @return the etag value. - */ - String etag(); - /** * Gets the state property: The current state of the application package. * @@ -74,6 +67,13 @@ public interface ApplicationPackage { */ OffsetDateTime lastActivationTime(); + /** + * Gets the etag property: The ETag of the resource, used for concurrency statements. + * + * @return the etag value. + */ + String etag(); + /** * Gets the inner com.azure.resourcemanager.batch.fluent.models.ApplicationPackageInner object. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountCreateParameters.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountCreateParameters.java index 230ee2ec7e96..4837ebd98de8 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountCreateParameters.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountCreateParameters.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.batch.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batch.fluent.models.BatchAccountCreateProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,8 +14,9 @@ import java.util.Map; /** Parameters supplied to the Create operation. */ +@JsonFlatten @Fluent -public final class BatchAccountCreateParameters { +public class BatchAccountCreateParameters { @JsonIgnore private final ClientLogger logger = new ClientLogger(BatchAccountCreateParameters.class); /* @@ -31,18 +32,56 @@ public final class BatchAccountCreateParameters { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /* - * The properties of the Batch account. - */ - @JsonProperty(value = "properties") - private BatchAccountCreateProperties innerProperties; - /* * The identity of the Batch account. */ @JsonProperty(value = "identity") private BatchAccountIdentity identity; + /* + * The properties related to the auto-storage account. + */ + @JsonProperty(value = "properties.autoStorage") + private AutoStorageBaseProperties autoStorage; + + /* + * The pool allocation mode also affects how clients may authenticate to + * the Batch Service API. If the mode is BatchService, clients may + * authenticate using access keys or Azure Active Directory. If the mode is + * UserSubscription, clients must use Azure Active Directory. The default + * is BatchService. + */ + @JsonProperty(value = "properties.poolAllocationMode") + private PoolAllocationMode poolAllocationMode; + + /* + * A reference to the Azure key vault associated with the Batch account. + */ + @JsonProperty(value = "properties.keyVaultReference") + private KeyVaultReference keyVaultReference; + + /* + * If not specified, the default value is 'enabled'. + */ + @JsonProperty(value = "properties.publicNetworkAccess") + private PublicNetworkAccessType publicNetworkAccess; + + /* + * Configures how customer data is encrypted inside the Batch account. By + * default, accounts are encrypted using a Microsoft managed key. For + * additional control, a customer-managed key can be used instead. + */ + @JsonProperty(value = "properties.encryption") + private EncryptionProperties encryption; + + /* + * List of allowed authentication modes for the Batch account that can be + * used to authenticate with the data plane. This does not affect + * authentication with the control plane. + */ + @JsonProperty(value = "properties.allowedAuthenticationModes") + private List allowedAuthenticationModes; + /** * Get the location property: The region in which to create the account. * @@ -83,15 +122,6 @@ public BatchAccountCreateParameters withTags(Map tags) { return this; } - /** - * Get the innerProperties property: The properties of the Batch account. - * - * @return the innerProperties value. - */ - private BatchAccountCreateProperties innerProperties() { - return this.innerProperties; - } - /** * Get the identity property: The identity of the Batch account. * @@ -118,7 +148,7 @@ public BatchAccountCreateParameters withIdentity(BatchAccountIdentity identity) * @return the autoStorage value. */ public AutoStorageBaseProperties autoStorage() { - return this.innerProperties() == null ? null : this.innerProperties().autoStorage(); + return this.autoStorage; } /** @@ -128,10 +158,7 @@ public AutoStorageBaseProperties autoStorage() { * @return the BatchAccountCreateParameters object itself. */ public BatchAccountCreateParameters withAutoStorage(AutoStorageBaseProperties autoStorage) { - if (this.innerProperties() == null) { - this.innerProperties = new BatchAccountCreateProperties(); - } - this.innerProperties().withAutoStorage(autoStorage); + this.autoStorage = autoStorage; return this; } @@ -143,7 +170,7 @@ public BatchAccountCreateParameters withAutoStorage(AutoStorageBaseProperties au * @return the poolAllocationMode value. */ public PoolAllocationMode poolAllocationMode() { - return this.innerProperties() == null ? null : this.innerProperties().poolAllocationMode(); + return this.poolAllocationMode; } /** @@ -155,10 +182,7 @@ public PoolAllocationMode poolAllocationMode() { * @return the BatchAccountCreateParameters object itself. */ public BatchAccountCreateParameters withPoolAllocationMode(PoolAllocationMode poolAllocationMode) { - if (this.innerProperties() == null) { - this.innerProperties = new BatchAccountCreateProperties(); - } - this.innerProperties().withPoolAllocationMode(poolAllocationMode); + this.poolAllocationMode = poolAllocationMode; return this; } @@ -168,7 +192,7 @@ public BatchAccountCreateParameters withPoolAllocationMode(PoolAllocationMode po * @return the keyVaultReference value. */ public KeyVaultReference keyVaultReference() { - return this.innerProperties() == null ? null : this.innerProperties().keyVaultReference(); + return this.keyVaultReference; } /** @@ -178,10 +202,7 @@ public KeyVaultReference keyVaultReference() { * @return the BatchAccountCreateParameters object itself. */ public BatchAccountCreateParameters withKeyVaultReference(KeyVaultReference keyVaultReference) { - if (this.innerProperties() == null) { - this.innerProperties = new BatchAccountCreateProperties(); - } - this.innerProperties().withKeyVaultReference(keyVaultReference); + this.keyVaultReference = keyVaultReference; return this; } @@ -191,7 +212,7 @@ public BatchAccountCreateParameters withKeyVaultReference(KeyVaultReference keyV * @return the publicNetworkAccess value. */ public PublicNetworkAccessType publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + return this.publicNetworkAccess; } /** @@ -201,10 +222,7 @@ public PublicNetworkAccessType publicNetworkAccess() { * @return the BatchAccountCreateParameters object itself. */ public BatchAccountCreateParameters withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new BatchAccountCreateProperties(); - } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + this.publicNetworkAccess = publicNetworkAccess; return this; } @@ -216,7 +234,7 @@ public BatchAccountCreateParameters withPublicNetworkAccess(PublicNetworkAccessT * @return the encryption value. */ public EncryptionProperties encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); + return this.encryption; } /** @@ -228,10 +246,7 @@ public EncryptionProperties encryption() { * @return the BatchAccountCreateParameters object itself. */ public BatchAccountCreateParameters withEncryption(EncryptionProperties encryption) { - if (this.innerProperties() == null) { - this.innerProperties = new BatchAccountCreateProperties(); - } - this.innerProperties().withEncryption(encryption); + this.encryption = encryption; return this; } @@ -242,7 +257,7 @@ public BatchAccountCreateParameters withEncryption(EncryptionProperties encrypti * @return the allowedAuthenticationModes value. */ public List allowedAuthenticationModes() { - return this.innerProperties() == null ? null : this.innerProperties().allowedAuthenticationModes(); + return this.allowedAuthenticationModes; } /** @@ -254,10 +269,7 @@ public List allowedAuthenticationModes() { */ public BatchAccountCreateParameters withAllowedAuthenticationModes( List allowedAuthenticationModes) { - if (this.innerProperties() == null) { - this.innerProperties = new BatchAccountCreateProperties(); - } - this.innerProperties().withAllowedAuthenticationModes(allowedAuthenticationModes); + this.allowedAuthenticationModes = allowedAuthenticationModes; return this; } @@ -273,11 +285,17 @@ public void validate() { new IllegalArgumentException( "Missing required property location in model BatchAccountCreateParameters")); } - if (innerProperties() != null) { - innerProperties().validate(); - } if (identity() != null) { identity().validate(); } + if (autoStorage() != null) { + autoStorage().validate(); + } + if (keyVaultReference() != null) { + keyVaultReference().validate(); + } + if (encryption() != null) { + encryption().validate(); + } } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountUpdateParameters.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountUpdateParameters.java index b61042b31030..2016a00cf631 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountUpdateParameters.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountUpdateParameters.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.batch.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batch.fluent.models.BatchAccountUpdateProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,8 +14,9 @@ import java.util.Map; /** Parameters for updating an Azure Batch account. */ +@JsonFlatten @Fluent -public final class BatchAccountUpdateParameters { +public class BatchAccountUpdateParameters { @JsonIgnore private final ClientLogger logger = new ClientLogger(BatchAccountUpdateParameters.class); /* @@ -25,18 +26,34 @@ public final class BatchAccountUpdateParameters { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /* - * The properties of the account. - */ - @JsonProperty(value = "properties") - private BatchAccountUpdateProperties innerProperties; - /* * The identity of the Batch account. */ @JsonProperty(value = "identity") private BatchAccountIdentity identity; + /* + * The properties related to the auto-storage account. + */ + @JsonProperty(value = "properties.autoStorage") + private AutoStorageBaseProperties autoStorage; + + /* + * Configures how customer data is encrypted inside the Batch account. By + * default, accounts are encrypted using a Microsoft managed key. For + * additional control, a customer-managed key can be used instead. + */ + @JsonProperty(value = "properties.encryption") + private EncryptionProperties encryption; + + /* + * List of allowed authentication modes for the Batch account that can be + * used to authenticate with the data plane. This does not affect + * authentication with the control plane. + */ + @JsonProperty(value = "properties.allowedAuthenticationModes") + private List allowedAuthenticationModes; + /** * Get the tags property: The user-specified tags associated with the account. * @@ -57,15 +74,6 @@ public BatchAccountUpdateParameters withTags(Map tags) { return this; } - /** - * Get the innerProperties property: The properties of the account. - * - * @return the innerProperties value. - */ - private BatchAccountUpdateProperties innerProperties() { - return this.innerProperties; - } - /** * Get the identity property: The identity of the Batch account. * @@ -92,7 +100,7 @@ public BatchAccountUpdateParameters withIdentity(BatchAccountIdentity identity) * @return the autoStorage value. */ public AutoStorageBaseProperties autoStorage() { - return this.innerProperties() == null ? null : this.innerProperties().autoStorage(); + return this.autoStorage; } /** @@ -102,10 +110,7 @@ public AutoStorageBaseProperties autoStorage() { * @return the BatchAccountUpdateParameters object itself. */ public BatchAccountUpdateParameters withAutoStorage(AutoStorageBaseProperties autoStorage) { - if (this.innerProperties() == null) { - this.innerProperties = new BatchAccountUpdateProperties(); - } - this.innerProperties().withAutoStorage(autoStorage); + this.autoStorage = autoStorage; return this; } @@ -117,7 +122,7 @@ public BatchAccountUpdateParameters withAutoStorage(AutoStorageBaseProperties au * @return the encryption value. */ public EncryptionProperties encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); + return this.encryption; } /** @@ -129,10 +134,7 @@ public EncryptionProperties encryption() { * @return the BatchAccountUpdateParameters object itself. */ public BatchAccountUpdateParameters withEncryption(EncryptionProperties encryption) { - if (this.innerProperties() == null) { - this.innerProperties = new BatchAccountUpdateProperties(); - } - this.innerProperties().withEncryption(encryption); + this.encryption = encryption; return this; } @@ -143,7 +145,7 @@ public BatchAccountUpdateParameters withEncryption(EncryptionProperties encrypti * @return the allowedAuthenticationModes value. */ public List allowedAuthenticationModes() { - return this.innerProperties() == null ? null : this.innerProperties().allowedAuthenticationModes(); + return this.allowedAuthenticationModes; } /** @@ -155,10 +157,7 @@ public List allowedAuthenticationModes() { */ public BatchAccountUpdateParameters withAllowedAuthenticationModes( List allowedAuthenticationModes) { - if (this.innerProperties() == null) { - this.innerProperties = new BatchAccountUpdateProperties(); - } - this.innerProperties().withAllowedAuthenticationModes(allowedAuthenticationModes); + this.allowedAuthenticationModes = allowedAuthenticationModes; return this; } @@ -168,11 +167,14 @@ public BatchAccountUpdateParameters withAllowedAuthenticationModes( * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } if (identity() != null) { identity().validate(); } + if (autoStorage() != null) { + autoStorage().validate(); + } + if (encryption() != null) { + encryption().validate(); + } } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Certificate.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Certificate.java index a539d210ef23..21116e94c210 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Certificate.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Certificate.java @@ -33,11 +33,26 @@ public interface Certificate { String type(); /** - * Gets the etag property: The ETag of the resource, used for concurrency statements. + * Gets the thumbprintAlgorithm property: The algorithm of the certificate thumbprint. This must match the first + * portion of the certificate name. Currently required to be 'SHA1'. * - * @return the etag value. + * @return the thumbprintAlgorithm value. */ - String etag(); + String thumbprintAlgorithm(); + + /** + * Gets the thumbprint property: The thumbprint of the certificate. This must match the thumbprint from the name. + * + * @return the thumbprint value. + */ + String thumbprint(); + + /** + * Gets the format property: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. + * + * @return the format value. + */ + CertificateFormat format(); /** * Gets the provisioningState property: The provisioningState property. @@ -84,26 +99,11 @@ public interface Certificate { DeleteCertificateError deleteCertificateError(); /** - * Gets the thumbprintAlgorithm property: The algorithm of the certificate thumbprint. This must match the first - * portion of the certificate name. Currently required to be 'SHA1'. - * - * @return the thumbprintAlgorithm value. - */ - String thumbprintAlgorithm(); - - /** - * Gets the thumbprint property: The thumbprint of the certificate. This must match the thumbprint from the name. - * - * @return the thumbprint value. - */ - String thumbprint(); - - /** - * Gets the format property: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. + * Gets the etag property: The ETag of the resource, used for concurrency statements. * - * @return the format value. + * @return the etag value. */ - CertificateFormat format(); + String etag(); /** * Gets the inner com.azure.resourcemanager.batch.fluent.models.CertificateInner object. @@ -137,11 +137,11 @@ interface WithParentResource { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithData, - DefinitionStages.WithPassword, - DefinitionStages.WithThumbprintAlgorithm, + extends DefinitionStages.WithThumbprintAlgorithm, DefinitionStages.WithThumbprint, DefinitionStages.WithFormat, + DefinitionStages.WithData, + DefinitionStages.WithPassword, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { /** @@ -159,28 +159,6 @@ interface WithCreate */ Certificate create(Context context); } - /** The stage of the Certificate definition allowing to specify data. */ - interface WithData { - /** - * Specifies the data property: The base64-encoded contents of the certificate. The maximum size is 10KB.. - * - * @param data The base64-encoded contents of the certificate. The maximum size is 10KB. - * @return the next definition stage. - */ - WithCreate withData(String data); - } - /** The stage of the Certificate definition allowing to specify password. */ - interface WithPassword { - /** - * Specifies the password property: The password to access the certificate's private key. This must not be - * specified if the certificate format is Cer.. - * - * @param password The password to access the certificate's private key. This must not be specified if the - * certificate format is Cer. - * @return the next definition stage. - */ - WithCreate withPassword(String password); - } /** The stage of the Certificate definition allowing to specify thumbprintAlgorithm. */ interface WithThumbprintAlgorithm { /** @@ -215,6 +193,28 @@ interface WithFormat { */ WithCreate withFormat(CertificateFormat format); } + /** The stage of the Certificate definition allowing to specify data. */ + interface WithData { + /** + * Specifies the data property: The base64-encoded contents of the certificate. The maximum size is 10KB.. + * + * @param data The base64-encoded contents of the certificate. The maximum size is 10KB. + * @return the next definition stage. + */ + WithCreate withData(String data); + } + /** The stage of the Certificate definition allowing to specify password. */ + interface WithPassword { + /** + * Specifies the password property: The password to access the certificate's private key. This must not be + * specified if the certificate format is Cer.. + * + * @param password The password to access the certificate's private key. This must not be specified if the + * certificate format is Cer. + * @return the next definition stage. + */ + WithCreate withPassword(String password); + } /** The stage of the Certificate definition allowing to specify ifMatch. */ interface WithIfMatch { /** @@ -251,11 +251,11 @@ interface WithIfNoneMatch { /** The template for Certificate update. */ interface Update - extends UpdateStages.WithData, - UpdateStages.WithPassword, - UpdateStages.WithThumbprintAlgorithm, + extends UpdateStages.WithThumbprintAlgorithm, UpdateStages.WithThumbprint, UpdateStages.WithFormat, + UpdateStages.WithData, + UpdateStages.WithPassword, UpdateStages.WithIfMatch { /** * Executes the update request. @@ -274,28 +274,6 @@ interface Update } /** The Certificate update stages. */ interface UpdateStages { - /** The stage of the Certificate update allowing to specify data. */ - interface WithData { - /** - * Specifies the data property: The base64-encoded contents of the certificate. The maximum size is 10KB.. - * - * @param data The base64-encoded contents of the certificate. The maximum size is 10KB. - * @return the next definition stage. - */ - Update withData(String data); - } - /** The stage of the Certificate update allowing to specify password. */ - interface WithPassword { - /** - * Specifies the password property: The password to access the certificate's private key. This must not be - * specified if the certificate format is Cer.. - * - * @param password The password to access the certificate's private key. This must not be specified if the - * certificate format is Cer. - * @return the next definition stage. - */ - Update withPassword(String password); - } /** The stage of the Certificate update allowing to specify thumbprintAlgorithm. */ interface WithThumbprintAlgorithm { /** @@ -330,6 +308,28 @@ interface WithFormat { */ Update withFormat(CertificateFormat format); } + /** The stage of the Certificate update allowing to specify data. */ + interface WithData { + /** + * Specifies the data property: The base64-encoded contents of the certificate. The maximum size is 10KB.. + * + * @param data The base64-encoded contents of the certificate. The maximum size is 10KB. + * @return the next definition stage. + */ + Update withData(String data); + } + /** The stage of the Certificate update allowing to specify password. */ + interface WithPassword { + /** + * Specifies the password property: The password to access the certificate's private key. This must not be + * specified if the certificate format is Cer.. + * + * @param password The password to access the certificate's private key. This must not be specified if the + * certificate format is Cer. + * @return the next definition stage. + */ + Update withPassword(String password); + } /** The stage of the Certificate update allowing to specify ifMatch. */ interface WithIfMatch { /** diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateCreateOrUpdateParameters.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateCreateOrUpdateParameters.java index 62844fa4b5bd..aacc36aaab28 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateCreateOrUpdateParameters.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateCreateOrUpdateParameters.java @@ -5,22 +5,52 @@ package com.azure.resourcemanager.batch.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batch.fluent.models.CertificateCreateOrUpdateProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Contains information about a certificate. */ +@JsonFlatten @Fluent -public final class CertificateCreateOrUpdateParameters extends ProxyResource { +public class CertificateCreateOrUpdateParameters extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateCreateOrUpdateParameters.class); /* - * The properties associated with the certificate. + * The algorithm of the certificate thumbprint. This must match the first + * portion of the certificate name. Currently required to be 'SHA1'. + */ + @JsonProperty(value = "properties.thumbprintAlgorithm") + private String thumbprintAlgorithm; + + /* + * The thumbprint of the certificate. This must match the thumbprint from + * the name. + */ + @JsonProperty(value = "properties.thumbprint") + private String thumbprint; + + /* + * The format of the certificate - either Pfx or Cer. If omitted, the + * default is Pfx. + */ + @JsonProperty(value = "properties.format") + private CertificateFormat format; + + /* + * The base64-encoded contents of the certificate. The maximum size is + * 10KB. + */ + @JsonProperty(value = "properties.data") + private String data; + + /* + * The password to access the certificate's private key. This must not be + * specified if the certificate format is Cer. */ - @JsonProperty(value = "properties") - private CertificateCreateOrUpdateProperties innerProperties; + @JsonProperty(value = "properties.password") + private String password; /* * The ETag of the resource, used for concurrency statements. @@ -29,140 +59,116 @@ public final class CertificateCreateOrUpdateParameters extends ProxyResource { private String etag; /** - * Get the innerProperties property: The properties associated with the certificate. + * Get the thumbprintAlgorithm property: The algorithm of the certificate thumbprint. This must match the first + * portion of the certificate name. Currently required to be 'SHA1'. * - * @return the innerProperties value. + * @return the thumbprintAlgorithm value. */ - private CertificateCreateOrUpdateProperties innerProperties() { - return this.innerProperties; + public String thumbprintAlgorithm() { + return this.thumbprintAlgorithm; } /** - * Get the etag property: The ETag of the resource, used for concurrency statements. + * Set the thumbprintAlgorithm property: The algorithm of the certificate thumbprint. This must match the first + * portion of the certificate name. Currently required to be 'SHA1'. * - * @return the etag value. + * @param thumbprintAlgorithm the thumbprintAlgorithm value to set. + * @return the CertificateCreateOrUpdateParameters object itself. */ - public String etag() { - return this.etag; + public CertificateCreateOrUpdateParameters withThumbprintAlgorithm(String thumbprintAlgorithm) { + this.thumbprintAlgorithm = thumbprintAlgorithm; + return this; } /** - * Get the data property: The base64-encoded contents of the certificate. The maximum size is 10KB. + * Get the thumbprint property: The thumbprint of the certificate. This must match the thumbprint from the name. * - * @return the data value. + * @return the thumbprint value. */ - public String data() { - return this.innerProperties() == null ? null : this.innerProperties().data(); + public String thumbprint() { + return this.thumbprint; } /** - * Set the data property: The base64-encoded contents of the certificate. The maximum size is 10KB. + * Set the thumbprint property: The thumbprint of the certificate. This must match the thumbprint from the name. * - * @param data the data value to set. + * @param thumbprint the thumbprint value to set. * @return the CertificateCreateOrUpdateParameters object itself. */ - public CertificateCreateOrUpdateParameters withData(String data) { - if (this.innerProperties() == null) { - this.innerProperties = new CertificateCreateOrUpdateProperties(); - } - this.innerProperties().withData(data); + public CertificateCreateOrUpdateParameters withThumbprint(String thumbprint) { + this.thumbprint = thumbprint; return this; } /** - * Get the password property: The password to access the certificate's private key. This must not be specified if - * the certificate format is Cer. + * Get the format property: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. * - * @return the password value. + * @return the format value. */ - public String password() { - return this.innerProperties() == null ? null : this.innerProperties().password(); + public CertificateFormat format() { + return this.format; } /** - * Set the password property: The password to access the certificate's private key. This must not be specified if - * the certificate format is Cer. + * Set the format property: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. * - * @param password the password value to set. + * @param format the format value to set. * @return the CertificateCreateOrUpdateParameters object itself. */ - public CertificateCreateOrUpdateParameters withPassword(String password) { - if (this.innerProperties() == null) { - this.innerProperties = new CertificateCreateOrUpdateProperties(); - } - this.innerProperties().withPassword(password); + public CertificateCreateOrUpdateParameters withFormat(CertificateFormat format) { + this.format = format; return this; } /** - * Get the thumbprintAlgorithm property: The algorithm of the certificate thumbprint. This must match the first - * portion of the certificate name. Currently required to be 'SHA1'. + * Get the data property: The base64-encoded contents of the certificate. The maximum size is 10KB. * - * @return the thumbprintAlgorithm value. + * @return the data value. */ - public String thumbprintAlgorithm() { - return this.innerProperties() == null ? null : this.innerProperties().thumbprintAlgorithm(); + public String data() { + return this.data; } /** - * Set the thumbprintAlgorithm property: The algorithm of the certificate thumbprint. This must match the first - * portion of the certificate name. Currently required to be 'SHA1'. + * Set the data property: The base64-encoded contents of the certificate. The maximum size is 10KB. * - * @param thumbprintAlgorithm the thumbprintAlgorithm value to set. + * @param data the data value to set. * @return the CertificateCreateOrUpdateParameters object itself. */ - public CertificateCreateOrUpdateParameters withThumbprintAlgorithm(String thumbprintAlgorithm) { - if (this.innerProperties() == null) { - this.innerProperties = new CertificateCreateOrUpdateProperties(); - } - this.innerProperties().withThumbprintAlgorithm(thumbprintAlgorithm); + public CertificateCreateOrUpdateParameters withData(String data) { + this.data = data; return this; } /** - * Get the thumbprint property: The thumbprint of the certificate. This must match the thumbprint from the name. + * Get the password property: The password to access the certificate's private key. This must not be specified if + * the certificate format is Cer. * - * @return the thumbprint value. + * @return the password value. */ - public String thumbprint() { - return this.innerProperties() == null ? null : this.innerProperties().thumbprint(); + public String password() { + return this.password; } /** - * Set the thumbprint property: The thumbprint of the certificate. This must match the thumbprint from the name. + * Set the password property: The password to access the certificate's private key. This must not be specified if + * the certificate format is Cer. * - * @param thumbprint the thumbprint value to set. + * @param password the password value to set. * @return the CertificateCreateOrUpdateParameters object itself. */ - public CertificateCreateOrUpdateParameters withThumbprint(String thumbprint) { - if (this.innerProperties() == null) { - this.innerProperties = new CertificateCreateOrUpdateProperties(); - } - this.innerProperties().withThumbprint(thumbprint); + public CertificateCreateOrUpdateParameters withPassword(String password) { + this.password = password; return this; } /** - * Get the format property: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. - * - * @return the format value. - */ - public CertificateFormat format() { - return this.innerProperties() == null ? null : this.innerProperties().format(); - } - - /** - * Set the format property: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. + * Get the etag property: The ETag of the resource, used for concurrency statements. * - * @param format the format value to set. - * @return the CertificateCreateOrUpdateParameters object itself. + * @return the etag value. */ - public CertificateCreateOrUpdateParameters withFormat(CertificateFormat format) { - if (this.innerProperties() == null) { - this.innerProperties = new CertificateCreateOrUpdateProperties(); - } - this.innerProperties().withFormat(format); - return this; + public String etag() { + return this.etag; } /** @@ -171,8 +177,5 @@ public CertificateCreateOrUpdateParameters withFormat(CertificateFormat format) * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CertificateCreateOrUpdateProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateCreateOrUpdateProperties.java similarity index 94% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CertificateCreateOrUpdateProperties.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateCreateOrUpdateProperties.java index b41a9bbec9e2..969337cc20ef 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CertificateCreateOrUpdateProperties.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateCreateOrUpdateProperties.java @@ -2,12 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch.fluent.models; +package com.azure.resourcemanager.batch.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batch.models.CertificateBaseProperties; -import com.azure.resourcemanager.batch.models.CertificateFormat; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CertificateProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateProperties.java similarity index 93% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CertificateProperties.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateProperties.java index 8b39b054a9a4..f9c58d45491a 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CertificateProperties.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateProperties.java @@ -2,14 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch.fluent.models; +package com.azure.resourcemanager.batch.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batch.models.CertificateBaseProperties; -import com.azure.resourcemanager.batch.models.CertificateFormat; -import com.azure.resourcemanager.batch.models.CertificateProvisioningState; -import com.azure.resourcemanager.batch.models.DeleteCertificateError; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Pool.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Pool.java index 00aff84ea86b..537756bf41cc 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Pool.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Pool.java @@ -40,13 +40,6 @@ public interface Pool { */ BatchPoolIdentity identity(); - /** - * Gets the etag property: The ETag of the resource, used for concurrency statements. - * - * @return the etag value. - */ - String etag(); - /** * Gets the displayName property: The display name for the pool. The display name need not be unique and can contain * any Unicode characters up to a maximum length of 1024. @@ -261,6 +254,13 @@ public interface Pool { */ List mountConfiguration(); + /** + * Gets the etag property: The ETag of the resource, used for concurrency statements. + * + * @return the etag value. + */ + String etag(); + /** * Gets the inner com.azure.resourcemanager.batch.fluent.models.PoolInner object. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnection.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnection.java index ab0c8597f6f1..12a4d76dad90 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnection.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnection.java @@ -29,13 +29,6 @@ public interface PrivateEndpointConnection { */ String type(); - /** - * Gets the etag property: The ETag of the resource, used for concurrency statements. - * - * @return the etag value. - */ - String etag(); - /** * Gets the provisioningState property: The provisioning state of the private endpoint connection. * @@ -58,6 +51,13 @@ public interface PrivateEndpointConnection { */ PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); + /** + * Gets the etag property: The ETag of the resource, used for concurrency statements. + * + * @return the etag value. + */ + String etag(); + /** * Gets the inner com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionInner object. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkResource.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkResource.java index c6dae0714f8a..ad87ea33742e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkResource.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkResource.java @@ -30,13 +30,6 @@ public interface PrivateLinkResource { */ String type(); - /** - * Gets the etag property: The ETag of the resource, used for concurrency statements. - * - * @return the etag value. - */ - String etag(); - /** * Gets the groupId property: The group id of the private link resource. The group id is used to establish the * private link connection. @@ -60,6 +53,13 @@ public interface PrivateLinkResource { */ List requiredZoneNames(); + /** + * Gets the etag property: The ETag of the resource, used for concurrency statements. + * + * @return the etag value. + */ + String etag(); + /** * Gets the inner com.azure.resourcemanager.batch.fluent.models.PrivateLinkResourceInner object. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/package-info.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/package-info.java index 2a7f85de666d..f7a8bcc2550e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/package-info.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/package-info.java @@ -2,5 +2,5 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the data models for BatchManagement. null. */ +/** Package containing the data models for BatchManagementClient. Batch Client. */ package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/package-info.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/package-info.java index f927ece06812..8284b4fa83e5 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/package-info.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/package-info.java @@ -2,5 +2,5 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the classes for BatchManagement. null. */ +/** Package containing the classes for BatchManagementClient. Batch Client. */ package com.azure.resourcemanager.batch;