scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -173,6 +189,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -206,7 +235,7 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil
.append("-")
.append("com.azure.resourcemanager.batch")
.append("/")
- .append("1.0.0-beta.3");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -224,10 +253,15 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
@@ -258,7 +292,11 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil
}
}
- /** @return Resource collection API of BatchAccounts. */
+ /**
+ * Gets the resource collection API of BatchAccounts. It manages BatchAccount.
+ *
+ * @return Resource collection API of BatchAccounts.
+ */
public BatchAccounts batchAccounts() {
if (this.batchAccounts == null) {
this.batchAccounts = new BatchAccountsImpl(clientObject.getBatchAccounts(), this);
@@ -266,7 +304,11 @@ public BatchAccounts batchAccounts() {
return batchAccounts;
}
- /** @return Resource collection API of ApplicationPackages. */
+ /**
+ * Gets the resource collection API of ApplicationPackages. It manages ApplicationPackage.
+ *
+ * @return Resource collection API of ApplicationPackages.
+ */
public ApplicationPackages applicationPackages() {
if (this.applicationPackages == null) {
this.applicationPackages = new ApplicationPackagesImpl(clientObject.getApplicationPackages(), this);
@@ -274,7 +316,11 @@ public ApplicationPackages applicationPackages() {
return applicationPackages;
}
- /** @return Resource collection API of Applications. */
+ /**
+ * Gets the resource collection API of Applications. It manages Application.
+ *
+ * @return Resource collection API of Applications.
+ */
public Applications applications() {
if (this.applications == null) {
this.applications = new ApplicationsImpl(clientObject.getApplications(), this);
@@ -282,7 +328,11 @@ public Applications applications() {
return applications;
}
- /** @return Resource collection API of Locations. */
+ /**
+ * Gets the resource collection API of Locations.
+ *
+ * @return Resource collection API of Locations.
+ */
public Locations locations() {
if (this.locations == null) {
this.locations = new LocationsImpl(clientObject.getLocations(), this);
@@ -290,7 +340,11 @@ public Locations locations() {
return locations;
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
@@ -298,7 +352,11 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of Certificates. */
+ /**
+ * Gets the resource collection API of Certificates. It manages Certificate.
+ *
+ * @return Resource collection API of Certificates.
+ */
public Certificates certificates() {
if (this.certificates == null) {
this.certificates = new CertificatesImpl(clientObject.getCertificates(), this);
@@ -306,7 +364,11 @@ public Certificates certificates() {
return certificates;
}
- /** @return Resource collection API of PrivateLinkResources. */
+ /**
+ * Gets the resource collection API of PrivateLinkResources.
+ *
+ * @return Resource collection API of PrivateLinkResources.
+ */
public PrivateLinkResources privateLinkResources() {
if (this.privateLinkResources == null) {
this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
@@ -314,7 +376,11 @@ public PrivateLinkResources privateLinkResources() {
return privateLinkResources;
}
- /** @return Resource collection API of PrivateEndpointConnections. */
+ /**
+ * Gets the resource collection API of PrivateEndpointConnections.
+ *
+ * @return Resource collection API of PrivateEndpointConnections.
+ */
public PrivateEndpointConnections privateEndpointConnections() {
if (this.privateEndpointConnections == null) {
this.privateEndpointConnections =
@@ -323,7 +389,11 @@ public PrivateEndpointConnections privateEndpointConnections() {
return privateEndpointConnections;
}
- /** @return Resource collection API of Pools. */
+ /**
+ * Gets the resource collection API of Pools. It manages Pool.
+ *
+ * @return Resource collection API of Pools.
+ */
public Pools pools() {
if (this.pools == null) {
this.pools = new PoolsImpl(clientObject.getPools(), this);
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/PrivateEndpointConnectionsClient.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/PrivateEndpointConnectionsClient.java
index b8c8ab1302e8..5e65bbc04fc4 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/PrivateEndpointConnectionsClient.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/PrivateEndpointConnectionsClient.java
@@ -197,4 +197,66 @@ PrivateEndpointConnectionInner update(
PrivateEndpointConnectionInner parameters,
String ifMatch,
Context context);
+
+ /**
+ * Deletes the specified private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the
+ * account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String accountName, String privateEndpointConnectionName);
+
+ /**
+ * Deletes the specified private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the
+ * account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String accountName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Deletes the specified private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the
+ * account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String accountName, String privateEndpointConnectionName);
+
+ /**
+ * Deletes the specified private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the
+ * account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String accountName, String privateEndpointConnectionName, Context context);
}
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
index 684f527d4e8b..eadac75eb46c 100644
--- 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
@@ -9,6 +9,7 @@
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.NetworkProfile;
import com.azure.resourcemanager.batch.models.PoolAllocationMode;
import com.azure.resourcemanager.batch.models.PublicNetworkAccessType;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -45,6 +46,13 @@ public final class BatchAccountCreateProperties {
@JsonProperty(value = "publicNetworkAccess")
private PublicNetworkAccessType publicNetworkAccess;
+ /*
+ * The network profile only takes effect when publicNetworkAccess is
+ * enabled.
+ */
+ @JsonProperty(value = "networkProfile")
+ private NetworkProfile networkProfile;
+
/*
* Configures how customer data is encrypted inside the Batch account. By
* default, accounts are encrypted using a Microsoft managed key. For
@@ -145,6 +153,26 @@ public BatchAccountCreateProperties withPublicNetworkAccess(PublicNetworkAccessT
return this;
}
+ /**
+ * Get the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled.
+ *
+ * @return the networkProfile value.
+ */
+ public NetworkProfile networkProfile() {
+ return this.networkProfile;
+ }
+
+ /**
+ * Set the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled.
+ *
+ * @param networkProfile the networkProfile value to set.
+ * @return the BatchAccountCreateProperties object itself.
+ */
+ public BatchAccountCreateProperties withNetworkProfile(NetworkProfile networkProfile) {
+ this.networkProfile = networkProfile;
+ 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
@@ -204,6 +232,9 @@ public void validate() {
if (keyVaultReference() != null) {
keyVaultReference().validate();
}
+ if (networkProfile() != null) {
+ networkProfile().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 cbe706f1a279..271c980b1989 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
@@ -11,6 +11,7 @@
import com.azure.resourcemanager.batch.models.BatchAccountIdentity;
import com.azure.resourcemanager.batch.models.EncryptionProperties;
import com.azure.resourcemanager.batch.models.KeyVaultReference;
+import com.azure.resourcemanager.batch.models.NetworkProfile;
import com.azure.resourcemanager.batch.models.PoolAllocationMode;
import com.azure.resourcemanager.batch.models.ProvisioningState;
import com.azure.resourcemanager.batch.models.PublicNetworkAccessType;
@@ -86,6 +87,16 @@ public String accountEndpoint() {
return this.innerProperties() == null ? null : this.innerProperties().accountEndpoint();
}
+ /**
+ * Get the nodeManagementEndpoint property: The endpoint used by compute node to connect to the Batch node
+ * management service.
+ *
+ * @return the nodeManagementEndpoint value.
+ */
+ public String nodeManagementEndpoint() {
+ return this.innerProperties() == null ? null : this.innerProperties().nodeManagementEndpoint();
+ }
+
/**
* Get the provisioningState property: The provisioned state of the resource.
*
@@ -122,6 +133,43 @@ public PublicNetworkAccessType publicNetworkAccess() {
return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess();
}
+ /**
+ * Set the publicNetworkAccess property: If not specified, the default value is 'enabled'.
+ *
+ * @param publicNetworkAccess the publicNetworkAccess value to set.
+ * @return the BatchAccountInner object itself.
+ */
+ public BatchAccountInner withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new BatchAccountProperties();
+ }
+ this.innerProperties().withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ }
+
+ /**
+ * Get the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled.
+ *
+ * @return the networkProfile value.
+ */
+ public NetworkProfile networkProfile() {
+ return this.innerProperties() == null ? null : this.innerProperties().networkProfile();
+ }
+
+ /**
+ * Set the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled.
+ *
+ * @param networkProfile the networkProfile value to set.
+ * @return the BatchAccountInner object itself.
+ */
+ public BatchAccountInner withNetworkProfile(NetworkProfile networkProfile) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new BatchAccountProperties();
+ }
+ this.innerProperties().withNetworkProfile(networkProfile);
+ return this;
+ }
+
/**
* Get the privateEndpointConnections property: List of private endpoint connections associated with the Batch
* account.
@@ -186,12 +234,10 @@ public List 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.
+ * Machine family are enforced for this account If this flag is true, dedicated core quota is enforced via both the
+ * dedicatedCoreQuotaPerVMFamily and dedicatedCoreQuota properties on the account. If this flag is false, dedicated
+ * core quota is enforced only via the dedicatedCoreQuota property on the account and does not consider Virtual
+ * Machine family.
*
* @return the dedicatedCoreQuotaPerVMFamilyEnforced value.
*/
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
index 55f1568e1e0e..a7f918193611 100644
--- 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
@@ -4,11 +4,12 @@
package com.azure.resourcemanager.batch.fluent.models;
-import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.Fluent;
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.NetworkProfile;
import com.azure.resourcemanager.batch.models.PoolAllocationMode;
import com.azure.resourcemanager.batch.models.ProvisioningState;
import com.azure.resourcemanager.batch.models.PublicNetworkAccessType;
@@ -17,7 +18,7 @@
import java.util.List;
/** Account specific properties. */
-@Immutable
+@Fluent
public final class BatchAccountProperties {
/*
* The account endpoint used to interact with the Batch service.
@@ -25,6 +26,13 @@ public final class BatchAccountProperties {
@JsonProperty(value = "accountEndpoint", access = JsonProperty.Access.WRITE_ONLY)
private String accountEndpoint;
+ /*
+ * The endpoint used by compute node to connect to the Batch node
+ * management service.
+ */
+ @JsonProperty(value = "nodeManagementEndpoint", access = JsonProperty.Access.WRITE_ONLY)
+ private String nodeManagementEndpoint;
+
/*
* The provisioned state of the resource
*/
@@ -46,9 +54,16 @@ public final class BatchAccountProperties {
/*
* If not specified, the default value is 'enabled'.
*/
- @JsonProperty(value = "publicNetworkAccess", access = JsonProperty.Access.WRITE_ONLY)
+ @JsonProperty(value = "publicNetworkAccess")
private PublicNetworkAccessType publicNetworkAccess;
+ /*
+ * The network profile only takes effect when publicNetworkAccess is
+ * enabled.
+ */
+ @JsonProperty(value = "networkProfile")
+ private NetworkProfile networkProfile;
+
/*
* List of private endpoint connections associated with the Batch account
*/
@@ -97,14 +112,11 @@ public final class BatchAccountProperties {
/*
* 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.
+ * enforced for this account If this flag is true, dedicated core quota is
+ * enforced via both the dedicatedCoreQuotaPerVMFamily and
+ * dedicatedCoreQuota properties on the account. If this flag is false,
+ * dedicated core quota is enforced only via the dedicatedCoreQuota
+ * property on the account and does not consider Virtual Machine family.
*/
@JsonProperty(value = "dedicatedCoreQuotaPerVMFamilyEnforced", access = JsonProperty.Access.WRITE_ONLY)
private Boolean dedicatedCoreQuotaPerVMFamilyEnforced;
@@ -138,6 +150,16 @@ public String accountEndpoint() {
return this.accountEndpoint;
}
+ /**
+ * Get the nodeManagementEndpoint property: The endpoint used by compute node to connect to the Batch node
+ * management service.
+ *
+ * @return the nodeManagementEndpoint value.
+ */
+ public String nodeManagementEndpoint() {
+ return this.nodeManagementEndpoint;
+ }
+
/**
* Get the provisioningState property: The provisioned state of the resource.
*
@@ -174,6 +196,37 @@ 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 BatchAccountProperties object itself.
+ */
+ public BatchAccountProperties withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) {
+ this.publicNetworkAccess = publicNetworkAccess;
+ return this;
+ }
+
+ /**
+ * Get the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled.
+ *
+ * @return the networkProfile value.
+ */
+ public NetworkProfile networkProfile() {
+ return this.networkProfile;
+ }
+
+ /**
+ * Set the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled.
+ *
+ * @param networkProfile the networkProfile value to set.
+ * @return the BatchAccountProperties object itself.
+ */
+ public BatchAccountProperties withNetworkProfile(NetworkProfile networkProfile) {
+ this.networkProfile = networkProfile;
+ return this;
+ }
+
/**
* Get the privateEndpointConnections property: List of private endpoint connections associated with the Batch
* account.
@@ -238,12 +291,10 @@ public List 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.
+ * Machine family are enforced for this account If this flag is true, dedicated core quota is enforced via both the
+ * dedicatedCoreQuotaPerVMFamily and dedicatedCoreQuota properties on the account. If this flag is false, dedicated
+ * core quota is enforced only via the dedicatedCoreQuota property on the account and does not consider Virtual
+ * Machine family.
*
* @return the dedicatedCoreQuotaPerVMFamilyEnforced value.
*/
@@ -288,6 +339,9 @@ public void validate() {
if (keyVaultReference() != null) {
keyVaultReference().validate();
}
+ if (networkProfile() != null) {
+ networkProfile().validate();
+ }
if (privateEndpointConnections() != null) {
privateEndpointConnections().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
index 236461db87df..fc59d35bd89b 100644
--- 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
@@ -8,6 +8,8 @@
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.NetworkProfile;
+import com.azure.resourcemanager.batch.models.PublicNetworkAccessType;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
@@ -36,6 +38,19 @@ public final class BatchAccountUpdateProperties {
@JsonProperty(value = "allowedAuthenticationModes")
private List allowedAuthenticationModes;
+ /*
+ * If not specified, the default value is 'enabled'.
+ */
+ @JsonProperty(value = "publicNetworkAccess")
+ private PublicNetworkAccessType publicNetworkAccess;
+
+ /*
+ * The network profile only takes effect when publicNetworkAccess is
+ * enabled.
+ */
+ @JsonProperty(value = "networkProfile")
+ private NetworkProfile networkProfile;
+
/**
* Get the autoStorage property: The properties related to the auto-storage account.
*
@@ -103,6 +118,46 @@ public BatchAccountUpdateProperties withAllowedAuthenticationModes(
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 BatchAccountUpdateProperties object itself.
+ */
+ public BatchAccountUpdateProperties withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) {
+ this.publicNetworkAccess = publicNetworkAccess;
+ return this;
+ }
+
+ /**
+ * Get the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled.
+ *
+ * @return the networkProfile value.
+ */
+ public NetworkProfile networkProfile() {
+ return this.networkProfile;
+ }
+
+ /**
+ * Set the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled.
+ *
+ * @param networkProfile the networkProfile value to set.
+ * @return the BatchAccountUpdateProperties object itself.
+ */
+ public BatchAccountUpdateProperties withNetworkProfile(NetworkProfile networkProfile) {
+ this.networkProfile = networkProfile;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -115,5 +170,8 @@ public void validate() {
if (encryption() != null) {
encryption().validate();
}
+ if (networkProfile() != null) {
+ networkProfile().validate();
+ }
}
}
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/OperationInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/OperationInner.java
index 3b1a9430134a..7af549bde92d 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/OperationInner.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/OperationInner.java
@@ -37,7 +37,7 @@ public final class OperationInner {
private String origin;
/*
- * Any object
+ * Properties of the operation.
*/
@JsonProperty(value = "properties")
private Object properties;
@@ -123,7 +123,7 @@ public OperationInner withOrigin(String origin) {
}
/**
- * Get the properties property: Any object.
+ * Get the properties property: Properties of the operation.
*
* @return the properties value.
*/
@@ -132,7 +132,7 @@ public Object properties() {
}
/**
- * Set the properties property: Any object.
+ * Set the properties property: Properties of the operation.
*
* @param properties the properties value to set.
* @return the OperationInner object itself.
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 973622967360..7a61c1cf36b8 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
@@ -10,6 +10,7 @@
import com.azure.resourcemanager.batch.models.PrivateEndpointConnectionProvisioningState;
import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionState;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
/** Contains information about a private link resource. */
@Fluent
@@ -63,17 +64,13 @@ public PrivateEndpoint privateEndpoint() {
}
/**
- * Set the privateEndpoint property: The private endpoint of the private endpoint connection.
+ * Get the groupIds property: The group id of the private endpoint connection. The value has one and only one group
+ * id.
*
- * @param privateEndpoint the privateEndpoint value to set.
- * @return the PrivateEndpointConnectionInner object itself.
+ * @return the groupIds value.
*/
- public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
- if (this.innerProperties() == null) {
- this.innerProperties = new PrivateEndpointConnectionProperties();
- }
- this.innerProperties().withPrivateEndpoint(privateEndpoint);
- return this;
+ public List groupIds() {
+ return this.innerProperties() == null ? null : this.innerProperties().groupIds();
}
/**
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
index 076a6c9ffb69..e480c42431d9 100644
--- 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
@@ -9,6 +9,7 @@
import com.azure.resourcemanager.batch.models.PrivateEndpointConnectionProvisioningState;
import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionState;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
/** Private endpoint connection properties. */
@Fluent
@@ -22,9 +23,16 @@ public final class PrivateEndpointConnectionProperties {
/*
* The private endpoint of the private endpoint connection.
*/
- @JsonProperty(value = "privateEndpoint")
+ @JsonProperty(value = "privateEndpoint", access = JsonProperty.Access.WRITE_ONLY)
private PrivateEndpoint privateEndpoint;
+ /*
+ * The group id of the private endpoint connection. The value has one and
+ * only one group id.
+ */
+ @JsonProperty(value = "groupIds", access = JsonProperty.Access.WRITE_ONLY)
+ private List groupIds;
+
/*
* The private link service connection state of the private endpoint
* connection
@@ -51,14 +59,13 @@ public PrivateEndpoint privateEndpoint() {
}
/**
- * Set the privateEndpoint property: The private endpoint of the private endpoint connection.
+ * Get the groupIds property: The group id of the private endpoint connection. The value has one and only one group
+ * id.
*
- * @param privateEndpoint the privateEndpoint value to set.
- * @return the PrivateEndpointConnectionProperties object itself.
+ * @return the groupIds value.
*/
- public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
- this.privateEndpoint = privateEndpoint;
- return this;
+ public List groupIds() {
+ return this.groupIds;
}
/**
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..c2b473a36edd 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
@@ -41,6 +41,10 @@ public String defaultVersion() {
return this.innerModel().defaultVersion();
}
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
public ApplicationInner 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 2403ac1de5e4..bb0f9ba8d0b4 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
@@ -325,14 +325,7 @@ private Mono activateAsync(
String versionName,
ActivateApplicationPackageParameters parameters) {
return activateWithResponseAsync(resourceGroupName, accountName, applicationName, versionName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -553,14 +546,7 @@ private Mono createAsync(
String versionName,
ApplicationPackageInner parameters) {
return createWithResponseAsync(resourceGroupName, accountName, applicationName, versionName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -583,14 +569,7 @@ private Mono createAsync(
String resourceGroupName, String accountName, String applicationName, String versionName) {
final ApplicationPackageInner parameters = null;
return createWithResponseAsync(resourceGroupName, accountName, applicationName, versionName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -776,7 +755,7 @@ private Mono> deleteWithResponseAsync(
private Mono deleteAsync(
String resourceGroupName, String accountName, String applicationName, String versionName) {
return deleteWithResponseAsync(resourceGroupName, accountName, applicationName, versionName)
- .flatMap((Response res) -> Mono.empty());
+ .flatMap(ignored -> Mono.empty());
}
/**
@@ -948,14 +927,7 @@ private Mono> getWithResponseAsync(
private Mono getAsync(
String resourceGroupName, String accountName, String applicationName, String versionName) {
return getWithResponseAsync(resourceGroupName, accountName, applicationName, versionName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
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 8a674ddbb454..3b50efbbe3cb 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
@@ -291,14 +291,7 @@ private Mono> createWithResponseAsync(
private Mono createAsync(
String resourceGroupName, String accountName, String applicationName, ApplicationInner parameters) {
return createWithResponseAsync(resourceGroupName, accountName, applicationName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -316,14 +309,7 @@ private Mono createAsync(
private Mono createAsync(String resourceGroupName, String accountName, String applicationName) {
final ApplicationInner parameters = null;
return createWithResponseAsync(resourceGroupName, accountName, applicationName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -486,7 +472,7 @@ private Mono> deleteWithResponseAsync(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String accountName, String applicationName) {
return deleteWithResponseAsync(resourceGroupName, accountName, applicationName)
- .flatMap((Response res) -> Mono.empty());
+ .flatMap(ignored -> Mono.empty());
}
/**
@@ -644,14 +630,7 @@ private Mono> getWithResponseAsync(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAsync(String resourceGroupName, String accountName, String applicationName) {
return getWithResponseAsync(resourceGroupName, accountName, applicationName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -830,14 +809,7 @@ private Mono> updateWithResponseAsync(
private Mono updateAsync(
String resourceGroupName, String accountName, String applicationName, ApplicationInner parameters) {
return updateWithResponseAsync(resourceGroupName, accountName, applicationName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountImpl.java
index 31a3e1ed8831..457b2b420498 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountImpl.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountImpl.java
@@ -20,6 +20,7 @@
import com.azure.resourcemanager.batch.models.BatchAccountUpdateParameters;
import com.azure.resourcemanager.batch.models.EncryptionProperties;
import com.azure.resourcemanager.batch.models.KeyVaultReference;
+import com.azure.resourcemanager.batch.models.NetworkProfile;
import com.azure.resourcemanager.batch.models.PoolAllocationMode;
import com.azure.resourcemanager.batch.models.PrivateEndpointConnection;
import com.azure.resourcemanager.batch.models.ProvisioningState;
@@ -68,6 +69,10 @@ public String accountEndpoint() {
return this.innerModel().accountEndpoint();
}
+ public String nodeManagementEndpoint() {
+ return this.innerModel().nodeManagementEndpoint();
+ }
+
public ProvisioningState provisioningState() {
return this.innerModel().provisioningState();
}
@@ -84,6 +89,10 @@ public PublicNetworkAccessType publicNetworkAccess() {
return this.innerModel().publicNetworkAccess();
}
+ public NetworkProfile networkProfile() {
+ return this.innerModel().networkProfile();
+ }
+
public List privateEndpointConnections() {
List inner = this.innerModel().privateEndpointConnections();
if (inner != null) {
@@ -152,6 +161,10 @@ public String regionName() {
return this.location();
}
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
public BatchAccountInner innerModel() {
return this.innerObject;
}
@@ -330,8 +343,23 @@ public BatchAccountImpl withKeyVaultReference(KeyVaultReference keyVaultReferenc
}
public BatchAccountImpl withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) {
- this.createParameters.withPublicNetworkAccess(publicNetworkAccess);
- return this;
+ if (isInCreateMode()) {
+ this.createParameters.withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ } else {
+ this.updateParameters.withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ }
+ }
+
+ public BatchAccountImpl withNetworkProfile(NetworkProfile networkProfile) {
+ if (isInCreateMode()) {
+ this.createParameters.withNetworkProfile(networkProfile);
+ return this;
+ } else {
+ this.updateParameters.withNetworkProfile(networkProfile);
+ return this;
+ }
}
public BatchAccountImpl withEncryption(EncryptionProperties encryption) {
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 336ca4c6e914..817d363cd0db 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
@@ -727,14 +727,7 @@ private Mono> updateWithResponseAsync(
private Mono updateAsync(
String resourceGroupName, String accountName, BatchAccountUpdateParameters parameters) {
return updateWithResponseAsync(resourceGroupName, accountName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -1108,14 +1101,7 @@ private Mono> getByResourceGroupWithResponseAsync(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) {
return getByResourceGroupWithResponseAsync(resourceGroupName, accountName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -1575,7 +1561,7 @@ private Mono> synchronizeAutoStorageKeysWithResponseAsync(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono synchronizeAutoStorageKeysAsync(String resourceGroupName, String accountName) {
return synchronizeAutoStorageKeysWithResponseAsync(resourceGroupName, accountName)
- .flatMap((Response res) -> Mono.empty());
+ .flatMap(ignored -> Mono.empty());
}
/**
@@ -1743,14 +1729,7 @@ private Mono> regenerateKeyWithResponseAsync(
private Mono regenerateKeyAsync(
String resourceGroupName, String accountName, BatchAccountRegenerateKeyParameters parameters) {
return regenerateKeyWithResponseAsync(resourceGroupName, accountName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -1907,14 +1886,7 @@ private Mono> getKeysWithResponseAsync(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getKeysAsync(String resourceGroupName, String accountName) {
return getKeysWithResponseAsync(resourceGroupName, accountName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -2260,14 +2232,7 @@ private Mono> getDetectorWithResponseAsync(
private Mono getDetectorAsync(
String resourceGroupName, String accountName, String detectorId) {
return getDetectorWithResponseAsync(resourceGroupName, accountName, detectorId)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientBuilder.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientBuilder.java
index b8c93ae89743..edc22abc2cbe 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientBuilder.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -68,34 +67,34 @@ public BatchManagementClientBuilder environment(AzureEnvironment environment) {
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the BatchManagementClientBuilder.
*/
- public BatchManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public BatchManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the BatchManagementClientBuilder.
*/
- public BatchManagementClientBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public BatchManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -127,15 +126,12 @@ public BatchManagementClientImpl buildClient() {
if (environment == null) {
this.environment = AzureEnvironment.AZURE;
}
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
if (defaultPollInterval == null) {
this.defaultPollInterval = Duration.ofSeconds(30);
}
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
if (serializerAdapter == null) {
this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
}
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java
index 135451de7dac..68479f739f71 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java
@@ -15,6 +15,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
@@ -37,7 +38,6 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
-import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -247,7 +247,7 @@ public PoolsClient getPools() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2022-01-01";
+ this.apiVersion = "2022-06-01";
this.batchAccounts = new BatchAccountsClientImpl(this);
this.applicationPackages = new ApplicationPackagesClientImpl(this);
this.applications = new ApplicationsClientImpl(this);
@@ -275,10 +275,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry