, Void> beginPurgeDeleted(
String location, String configStoreName, Context context) {
- return beginPurgeDeletedAsync(location, configStoreName, context).getSyncPoller();
+ return this.beginPurgeDeletedAsync(location, configStoreName, context).getSyncPoller();
}
/**
@@ -2551,7 +2545,8 @@ public void purgeDeleted(String location, String configStoreName, Context contex
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -2587,7 +2582,8 @@ private Mono> listNextSinglePageAsync(Str
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -2624,7 +2620,8 @@ private Mono> listNextSinglePageAsync(Str
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -2661,7 +2658,8 @@ private Mono> listByResourceGroupNextSing
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -2699,7 +2697,8 @@ private Mono> listByResourceGroupNextSing
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -2735,7 +2734,8 @@ private Mono> listKeysNextSinglePageAsync(String next
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -2772,7 +2772,8 @@ private Mono> listKeysNextSinglePageAsync(String next
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -2808,7 +2809,8 @@ private Mono> listDeletedNextSingl
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ConfigurationStoresImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ConfigurationStoresImpl.java
index f284e5e84a75d..ce41fa377799b 100644
--- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ConfigurationStoresImpl.java
+++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ConfigurationStoresImpl.java
@@ -55,15 +55,6 @@ public PagedIterable listByResourceGroup(
return Utils.mapPage(inner, inner1 -> new ConfigurationStoreImpl(inner1, this.manager()));
}
- public ConfigurationStore getByResourceGroup(String resourceGroupName, String configStoreName) {
- ConfigurationStoreInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, configStoreName);
- if (inner != null) {
- return new ConfigurationStoreImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getByResourceGroupWithResponse(
String resourceGroupName, String configStoreName, Context context) {
Response inner =
@@ -79,6 +70,15 @@ public Response getByResourceGroupWithResponse(
}
}
+ public ConfigurationStore getByResourceGroup(String resourceGroupName, String configStoreName) {
+ ConfigurationStoreInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, configStoreName);
+ if (inner != null) {
+ return new ConfigurationStoreImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
public void deleteByResourceGroup(String resourceGroupName, String configStoreName) {
this.serviceClient().delete(resourceGroupName, configStoreName);
}
@@ -99,17 +99,6 @@ public PagedIterable listKeys(
return Utils.mapPage(inner, inner1 -> new ApiKeyImpl(inner1, this.manager()));
}
- public ApiKey regenerateKey(
- String resourceGroupName, String configStoreName, RegenerateKeyParameters regenerateKeyParameters) {
- ApiKeyInner inner =
- this.serviceClient().regenerateKey(resourceGroupName, configStoreName, regenerateKeyParameters);
- if (inner != null) {
- return new ApiKeyImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response regenerateKeyWithResponse(
String resourceGroupName,
String configStoreName,
@@ -130,6 +119,17 @@ public Response regenerateKeyWithResponse(
}
}
+ public ApiKey regenerateKey(
+ String resourceGroupName, String configStoreName, RegenerateKeyParameters regenerateKeyParameters) {
+ ApiKeyInner inner =
+ this.serviceClient().regenerateKey(resourceGroupName, configStoreName, regenerateKeyParameters);
+ if (inner != null) {
+ return new ApiKeyImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
public PagedIterable listDeleted() {
PagedIterable inner = this.serviceClient().listDeleted();
return Utils.mapPage(inner, inner1 -> new DeletedConfigurationStoreImpl(inner1, this.manager()));
@@ -140,15 +140,6 @@ public PagedIterable listDeleted(Context context) {
return Utils.mapPage(inner, inner1 -> new DeletedConfigurationStoreImpl(inner1, this.manager()));
}
- public DeletedConfigurationStore getDeleted(String location, String configStoreName) {
- DeletedConfigurationStoreInner inner = this.serviceClient().getDeleted(location, configStoreName);
- if (inner != null) {
- return new DeletedConfigurationStoreImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getDeletedWithResponse(
String location, String configStoreName, Context context) {
Response inner =
@@ -164,6 +155,15 @@ public Response getDeletedWithResponse(
}
}
+ public DeletedConfigurationStore getDeleted(String location, String configStoreName) {
+ DeletedConfigurationStoreInner inner = this.serviceClient().getDeleted(location, configStoreName);
+ if (inner != null) {
+ return new DeletedConfigurationStoreImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
public void purgeDeleted(String location, String configStoreName) {
this.serviceClient().purgeDeleted(location, configStoreName);
}
diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/KeyValuesClientImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/KeyValuesClientImpl.java
index 3d1438d30a15e..3e8afe89d6708 100644
--- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/KeyValuesClientImpl.java
+++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/KeyValuesClientImpl.java
@@ -19,10 +19,6 @@
import com.azure.core.annotation.ServiceInterface;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.UnexpectedResponseExceptionType;
-import com.azure.core.http.rest.PagedFlux;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.http.rest.PagedResponse;
-import com.azure.core.http.rest.PagedResponseBase;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.RestProxy;
import com.azure.core.management.exception.ManagementException;
@@ -33,7 +29,6 @@
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.appconfiguration.fluent.KeyValuesClient;
import com.azure.resourcemanager.appconfiguration.fluent.models.KeyValueInner;
-import com.azure.resourcemanager.appconfiguration.models.KeyValueListResult;
import java.nio.ByteBuffer;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -63,27 +58,10 @@ public final class KeyValuesClientImpl implements KeyValuesClient {
*/
@Host("{$host}")
@ServiceInterface(name = "AppConfigurationMana")
- private interface KeyValuesService {
+ public interface KeyValuesService {
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration"
- + "/configurationStores/{configStoreName}/keyValues")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByConfigurationStore(
- @HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("configStoreName") String configStoreName,
- @QueryParam("api-version") String apiVersion,
- @QueryParam("$skipToken") String skipToken,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration"
- + "/configurationStores/{configStoreName}/keyValues/{keyValueName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> get(
@@ -98,8 +76,7 @@ Mono> get(
@Headers({"Content-Type: application/json"})
@Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration"
- + "/configurationStores/{configStoreName}/keyValues/{keyValueName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> createOrUpdate(
@@ -115,8 +92,7 @@ Mono> createOrUpdate(
@Headers({"Content-Type: application/json"})
@Delete(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration"
- + "/configurationStores/{configStoreName}/keyValues/{keyValueName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}")
@ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> delete(
@@ -128,238 +104,6 @@ Mono>> delete(
@PathParam("keyValueName") String keyValueName,
@HeaderParam("Accept") String accept,
Context context);
-
- @Headers({"Content-Type: application/json"})
- @Get("{nextLink}")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByConfigurationStoreNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept,
- Context context);
- }
-
- /**
- * Lists the key-values for a given configuration store.
- *
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
- * @param configStoreName The name of the configuration store.
- * @param skipToken A skip token is used to continue retrieving items after an operation returns a partial result.
- * If a previous response contains a nextLink element, the value of the nextLink element will include a
- * skipToken parameter that specifies a starting point to use for subsequent calls.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 result of a request to list key-values along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByConfigurationStoreSinglePageAsync(
- String resourceGroupName, String configStoreName, String skipToken) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (configStoreName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter configStoreName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .listByConfigurationStore(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- configStoreName,
- this.client.getApiVersion(),
- skipToken,
- accept,
- context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Lists the key-values for a given configuration store.
- *
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
- * @param configStoreName The name of the configuration store.
- * @param skipToken A skip token is used to continue retrieving items after an operation returns a partial result.
- * If a previous response contains a nextLink element, the value of the nextLink element will include a
- * skipToken parameter that specifies a starting point to use for subsequent calls.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 result of a request to list key-values along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByConfigurationStoreSinglePageAsync(
- String resourceGroupName, String configStoreName, String skipToken, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (configStoreName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter configStoreName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listByConfigurationStore(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- configStoreName,
- this.client.getApiVersion(),
- skipToken,
- accept,
- context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
- }
-
- /**
- * Lists the key-values for a given configuration store.
- *
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
- * @param configStoreName The name of the configuration store.
- * @param skipToken A skip token is used to continue retrieving items after an operation returns a partial result.
- * If a previous response contains a nextLink element, the value of the nextLink element will include a
- * skipToken parameter that specifies a starting point to use for subsequent calls.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 result of a request to list key-values as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByConfigurationStoreAsync(
- String resourceGroupName, String configStoreName, String skipToken) {
- return new PagedFlux<>(
- () -> listByConfigurationStoreSinglePageAsync(resourceGroupName, configStoreName, skipToken),
- nextLink -> listByConfigurationStoreNextSinglePageAsync(nextLink));
- }
-
- /**
- * Lists the key-values for a given configuration store.
- *
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
- * @param configStoreName The name of the configuration store.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 result of a request to list key-values as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByConfigurationStoreAsync(String resourceGroupName, String configStoreName) {
- final String skipToken = null;
- return new PagedFlux<>(
- () -> listByConfigurationStoreSinglePageAsync(resourceGroupName, configStoreName, skipToken),
- nextLink -> listByConfigurationStoreNextSinglePageAsync(nextLink));
- }
-
- /**
- * Lists the key-values for a given configuration store.
- *
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
- * @param configStoreName The name of the configuration store.
- * @param skipToken A skip token is used to continue retrieving items after an operation returns a partial result.
- * If a previous response contains a nextLink element, the value of the nextLink element will include a
- * skipToken parameter that specifies a starting point to use for subsequent calls.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 result of a request to list key-values as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByConfigurationStoreAsync(
- String resourceGroupName, String configStoreName, String skipToken, Context context) {
- return new PagedFlux<>(
- () -> listByConfigurationStoreSinglePageAsync(resourceGroupName, configStoreName, skipToken, context),
- nextLink -> listByConfigurationStoreNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * Lists the key-values for a given configuration store.
- *
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
- * @param configStoreName The name of the configuration store.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 result of a request to list key-values as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByConfigurationStore(String resourceGroupName, String configStoreName) {
- final String skipToken = null;
- return new PagedIterable<>(listByConfigurationStoreAsync(resourceGroupName, configStoreName, skipToken));
- }
-
- /**
- * Lists the key-values for a given configuration store.
- *
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
- * @param configStoreName The name of the configuration store.
- * @param skipToken A skip token is used to continue retrieving items after an operation returns a partial result.
- * If a previous response contains a nextLink element, the value of the nextLink element will include a
- * skipToken parameter that specifies a starting point to use for subsequent calls.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 result of a request to list key-values as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByConfigurationStore(
- String resourceGroupName, String configStoreName, String skipToken, Context context) {
- return new PagedIterable<>(
- listByConfigurationStoreAsync(resourceGroupName, configStoreName, skipToken, context));
}
/**
@@ -497,14 +241,16 @@ private Mono getAsync(String resourceGroupName, String configStor
* @param configStoreName The name of the configuration store.
* @param keyValueName Identifier of key and label combination. Key and label are joined by $ character. Label is
* optional.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 properties of the specified key-value.
+ * @return the properties of the specified key-value along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public KeyValueInner get(String resourceGroupName, String configStoreName, String keyValueName) {
- return getAsync(resourceGroupName, configStoreName, keyValueName).block();
+ public Response getWithResponse(
+ String resourceGroupName, String configStoreName, String keyValueName, Context context) {
+ return getWithResponseAsync(resourceGroupName, configStoreName, keyValueName, context).block();
}
/**
@@ -514,16 +260,14 @@ public KeyValueInner get(String resourceGroupName, String configStoreName, Strin
* @param configStoreName The name of the configuration store.
* @param keyValueName Identifier of key and label combination. Key and label are joined by $ character. Label is
* optional.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 properties of the specified key-value along with {@link Response}.
+ * @return the properties of the specified key-value.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(
- String resourceGroupName, String configStoreName, String keyValueName, Context context) {
- return getWithResponseAsync(resourceGroupName, configStoreName, keyValueName, context).block();
+ public KeyValueInner get(String resourceGroupName, String configStoreName, String keyValueName) {
+ return getWithResponse(resourceGroupName, configStoreName, keyValueName, Context.NONE).getValue();
}
/**
@@ -657,7 +401,6 @@ private Mono> createOrUpdateWithResponseAsync(
* @param configStoreName The name of the configuration store.
* @param keyValueName Identifier of key and label combination. Key and label are joined by $ character. Label is
* optional.
- * @param keyValueParameters The parameters for creating a key-value.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -665,7 +408,8 @@ private Mono> createOrUpdateWithResponseAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
- String resourceGroupName, String configStoreName, String keyValueName, KeyValueInner keyValueParameters) {
+ String resourceGroupName, String configStoreName, String keyValueName) {
+ final KeyValueInner keyValueParameters = null;
return createOrUpdateWithResponseAsync(resourceGroupName, configStoreName, keyValueName, keyValueParameters)
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
@@ -677,17 +421,23 @@ private Mono createOrUpdateAsync(
* @param configStoreName The name of the configuration store.
* @param keyValueName Identifier of key and label combination. Key and label are joined by $ character. Label is
* optional.
+ * @param keyValueParameters The parameters for creating a key-value.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 key-value resource along with all resource properties on successful completion of {@link Mono}.
+ * @return the key-value resource along with all resource properties along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(
- String resourceGroupName, String configStoreName, String keyValueName) {
- final KeyValueInner keyValueParameters = null;
- return createOrUpdateWithResponseAsync(resourceGroupName, configStoreName, keyValueName, keyValueParameters)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String configStoreName,
+ String keyValueName,
+ KeyValueInner keyValueParameters,
+ Context context) {
+ return createOrUpdateWithResponseAsync(
+ resourceGroupName, configStoreName, keyValueName, keyValueParameters, context)
+ .block();
}
/**
@@ -705,33 +455,9 @@ private Mono createOrUpdateAsync(
@ServiceMethod(returns = ReturnType.SINGLE)
public KeyValueInner createOrUpdate(String resourceGroupName, String configStoreName, String keyValueName) {
final KeyValueInner keyValueParameters = null;
- return createOrUpdateAsync(resourceGroupName, configStoreName, keyValueName, keyValueParameters).block();
- }
-
- /**
- * Creates a key-value.
- *
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
- * @param configStoreName The name of the configuration store.
- * @param keyValueName Identifier of key and label combination. Key and label are joined by $ character. Label is
- * optional.
- * @param keyValueParameters The parameters for creating a key-value.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 key-value resource along with all resource properties along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateWithResponse(
- String resourceGroupName,
- String configStoreName,
- String keyValueName,
- KeyValueInner keyValueParameters,
- Context context) {
- return createOrUpdateWithResponseAsync(
- resourceGroupName, configStoreName, keyValueName, keyValueParameters, context)
- .block();
+ return createOrUpdateWithResponse(
+ resourceGroupName, configStoreName, keyValueName, keyValueParameters, Context.NONE)
+ .getValue();
}
/**
@@ -904,7 +630,7 @@ private PollerFlux, Void> beginDeleteAsync(
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String configStoreName, String keyValueName) {
- return beginDeleteAsync(resourceGroupName, configStoreName, keyValueName).getSyncPoller();
+ return this.beginDeleteAsync(resourceGroupName, configStoreName, keyValueName).getSyncPoller();
}
/**
@@ -923,7 +649,7 @@ public SyncPoller, Void> beginDelete(
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String configStoreName, String keyValueName, Context context) {
- return beginDeleteAsync(resourceGroupName, configStoreName, keyValueName, context).getSyncPoller();
+ return this.beginDeleteAsync(resourceGroupName, configStoreName, keyValueName, context).getSyncPoller();
}
/**
@@ -998,79 +724,4 @@ public void delete(String resourceGroupName, String configStoreName, String keyV
public void delete(String resourceGroupName, String configStoreName, String keyValueName, Context context) {
deleteAsync(resourceGroupName, configStoreName, keyValueName, context).block();
}
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The nextLink parameter.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 result of a request to list key-values along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByConfigurationStoreNextSinglePageAsync(String nextLink) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.listByConfigurationStoreNext(nextLink, this.client.getEndpoint(), accept, context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The nextLink parameter.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 result of a request to list key-values along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByConfigurationStoreNextSinglePageAsync(
- String nextLink, Context context) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listByConfigurationStoreNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
- }
}
diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/KeyValuesImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/KeyValuesImpl.java
index 021d2161b0d4f..bd01280881e95 100644
--- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/KeyValuesImpl.java
+++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/KeyValuesImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.appconfiguration.implementation;
-import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
@@ -28,28 +27,6 @@ public KeyValuesImpl(
this.serviceManager = serviceManager;
}
- public PagedIterable listByConfigurationStore(String resourceGroupName, String configStoreName) {
- PagedIterable inner =
- this.serviceClient().listByConfigurationStore(resourceGroupName, configStoreName);
- return Utils.mapPage(inner, inner1 -> new KeyValueImpl(inner1, this.manager()));
- }
-
- public PagedIterable listByConfigurationStore(
- String resourceGroupName, String configStoreName, String skipToken, Context context) {
- PagedIterable inner =
- this.serviceClient().listByConfigurationStore(resourceGroupName, configStoreName, skipToken, context);
- return Utils.mapPage(inner, inner1 -> new KeyValueImpl(inner1, this.manager()));
- }
-
- public KeyValue get(String resourceGroupName, String configStoreName, String keyValueName) {
- KeyValueInner inner = this.serviceClient().get(resourceGroupName, configStoreName, keyValueName);
- if (inner != null) {
- return new KeyValueImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getWithResponse(
String resourceGroupName, String configStoreName, String keyValueName, Context context) {
Response inner =
@@ -65,6 +42,15 @@ public Response getWithResponse(
}
}
+ public KeyValue get(String resourceGroupName, String configStoreName, String keyValueName) {
+ KeyValueInner inner = this.serviceClient().get(resourceGroupName, configStoreName, keyValueName);
+ if (inner != null) {
+ return new KeyValueImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
public void delete(String resourceGroupName, String configStoreName, String keyValueName) {
this.serviceClient().delete(resourceGroupName, configStoreName, keyValueName);
}
diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/OperationsClientImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/OperationsClientImpl.java
index 0090ad809a96a..ca0d80114da2c 100644
--- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/OperationsClientImpl.java
+++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/OperationsClientImpl.java
@@ -59,7 +59,7 @@ public final class OperationsClientImpl implements OperationsClient {
*/
@Host("{$host}")
@ServiceInterface(name = "AppConfigurationMana")
- private interface OperationsService {
+ public interface OperationsService {
@Headers({"Content-Type: application/json"})
@Post("/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/checkNameAvailability")
@ExpectedResponses({200})
@@ -85,8 +85,7 @@ Mono> list(
@Headers({"Content-Type: application/json"})
@Post(
- "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/locations/{location}"
- + "/checkNameAvailability")
+ "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/locations/{location}/checkNameAvailability")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> regionalCheckNameAvailability(
@@ -224,31 +223,31 @@ private Mono checkNameAvailabilityAsync(
* Checks whether the configuration store name is available for use.
*
* @param checkNameAvailabilityParameters The object containing information for the availability request.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 result of a request to check the availability of a resource name.
+ * @return the result of a request to check the availability of a resource name along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public NameAvailabilityStatusInner checkNameAvailability(
- CheckNameAvailabilityParameters checkNameAvailabilityParameters) {
- return checkNameAvailabilityAsync(checkNameAvailabilityParameters).block();
+ public Response checkNameAvailabilityWithResponse(
+ CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context) {
+ return checkNameAvailabilityWithResponseAsync(checkNameAvailabilityParameters, context).block();
}
/**
* Checks whether the configuration store name is available for use.
*
* @param checkNameAvailabilityParameters The object containing information for the availability request.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 result of a request to check the availability of a resource name along with {@link Response}.
+ * @return the result of a request to check the availability of a resource name.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response checkNameAvailabilityWithResponse(
- CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context) {
- return checkNameAvailabilityWithResponseAsync(checkNameAvailabilityParameters, context).block();
+ public NameAvailabilityStatusInner checkNameAvailability(
+ CheckNameAvailabilityParameters checkNameAvailabilityParameters) {
+ return checkNameAvailabilityWithResponse(checkNameAvailabilityParameters, Context.NONE).getValue();
}
/**
@@ -533,15 +532,17 @@ private Mono regionalCheckNameAvailabilityAsync(
*
* @param location The location in which uniqueness will be verified.
* @param checkNameAvailabilityParameters The object containing information for the availability request.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 result of a request to check the availability of a resource name.
+ * @return the result of a request to check the availability of a resource name along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public NameAvailabilityStatusInner regionalCheckNameAvailability(
- String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters) {
- return regionalCheckNameAvailabilityAsync(location, checkNameAvailabilityParameters).block();
+ public Response regionalCheckNameAvailabilityWithResponse(
+ String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context) {
+ return regionalCheckNameAvailabilityWithResponseAsync(location, checkNameAvailabilityParameters, context)
+ .block();
}
/**
@@ -549,23 +550,23 @@ public NameAvailabilityStatusInner regionalCheckNameAvailability(
*
* @param location The location in which uniqueness will be verified.
* @param checkNameAvailabilityParameters The object containing information for the availability request.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 result of a request to check the availability of a resource name along with {@link Response}.
+ * @return the result of a request to check the availability of a resource name.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response regionalCheckNameAvailabilityWithResponse(
- String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context) {
- return regionalCheckNameAvailabilityWithResponseAsync(location, checkNameAvailabilityParameters, context)
- .block();
+ public NameAvailabilityStatusInner regionalCheckNameAvailability(
+ String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters) {
+ return regionalCheckNameAvailabilityWithResponse(location, checkNameAvailabilityParameters, Context.NONE)
+ .getValue();
}
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -601,7 +602,8 @@ private Mono> listNextSinglePageAsync(St
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/OperationsImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/OperationsImpl.java
index 6019c87cead45..3515cb0b44d5a 100644
--- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/OperationsImpl.java
+++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/OperationsImpl.java
@@ -31,16 +31,6 @@ public OperationsImpl(
this.serviceManager = serviceManager;
}
- public NameAvailabilityStatus checkNameAvailability(
- CheckNameAvailabilityParameters checkNameAvailabilityParameters) {
- NameAvailabilityStatusInner inner = this.serviceClient().checkNameAvailability(checkNameAvailabilityParameters);
- if (inner != null) {
- return new NameAvailabilityStatusImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response checkNameAvailabilityWithResponse(
CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context) {
Response inner =
@@ -56,6 +46,16 @@ public Response checkNameAvailabilityWithResponse(
}
}
+ public NameAvailabilityStatus checkNameAvailability(
+ CheckNameAvailabilityParameters checkNameAvailabilityParameters) {
+ NameAvailabilityStatusInner inner = this.serviceClient().checkNameAvailability(checkNameAvailabilityParameters);
+ if (inner != null) {
+ return new NameAvailabilityStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
return Utils.mapPage(inner, inner1 -> new OperationDefinitionImpl(inner1, this.manager()));
@@ -66,17 +66,6 @@ public PagedIterable list(String skipToken, Context context
return Utils.mapPage(inner, inner1 -> new OperationDefinitionImpl(inner1, this.manager()));
}
- public NameAvailabilityStatus regionalCheckNameAvailability(
- String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters) {
- NameAvailabilityStatusInner inner =
- this.serviceClient().regionalCheckNameAvailability(location, checkNameAvailabilityParameters);
- if (inner != null) {
- return new NameAvailabilityStatusImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response regionalCheckNameAvailabilityWithResponse(
String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context) {
Response inner =
@@ -94,6 +83,17 @@ public Response regionalCheckNameAvailabilityWithRespons
}
}
+ public NameAvailabilityStatus regionalCheckNameAvailability(
+ String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters) {
+ NameAvailabilityStatusInner inner =
+ this.serviceClient().regionalCheckNameAvailability(location, checkNameAvailabilityParameters);
+ if (inner != null) {
+ return new NameAvailabilityStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
private OperationsClient serviceClient() {
return this.innerClient;
}
diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateEndpointConnectionsClientImpl.java
index 3c619651955ec..912e78fa79b1d 100644
--- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateEndpointConnectionsClientImpl.java
+++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateEndpointConnectionsClientImpl.java
@@ -65,11 +65,10 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi
*/
@Host("{$host}")
@ServiceInterface(name = "AppConfigurationMana")
- private interface PrivateEndpointConnectionsService {
+ public interface PrivateEndpointConnectionsService {
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration"
- + "/configurationStores/{configStoreName}/privateEndpointConnections")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByConfigurationStore(
@@ -83,8 +82,7 @@ Mono> listByConfigurationStore(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration"
- + "/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> get(
@@ -99,8 +97,7 @@ Mono> get(
@Headers({"Content-Type: application/json"})
@Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration"
- + "/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}")
@ExpectedResponses({200, 201})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> createOrUpdate(
@@ -116,8 +113,7 @@ Mono>> createOrUpdate(
@Headers({"Content-Type: application/json"})
@Delete(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration"
- + "/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}")
@ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> delete(
@@ -466,15 +462,17 @@ private Mono getAsync(
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param configStoreName The name of the configuration store.
* @param privateEndpointConnectionName Private endpoint connection name.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 specified private endpoint connection associated with the configuration store.
+ * @return the specified private endpoint connection associated with the configuration store along with {@link
+ * Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public PrivateEndpointConnectionInner get(
- String resourceGroupName, String configStoreName, String privateEndpointConnectionName) {
- return getAsync(resourceGroupName, configStoreName, privateEndpointConnectionName).block();
+ public Response getWithResponse(
+ String resourceGroupName, String configStoreName, String privateEndpointConnectionName, Context context) {
+ return getWithResponseAsync(resourceGroupName, configStoreName, privateEndpointConnectionName, context).block();
}
/**
@@ -483,21 +481,22 @@ public PrivateEndpointConnectionInner get(
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param configStoreName The name of the configuration store.
* @param privateEndpointConnectionName Private endpoint connection name.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 specified private endpoint connection associated with the configuration store along with {@link
- * Response}.
+ * @return the specified private endpoint connection associated with the configuration store.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(
- String resourceGroupName, String configStoreName, String privateEndpointConnectionName, Context context) {
- return getWithResponseAsync(resourceGroupName, configStoreName, privateEndpointConnectionName, context).block();
+ public PrivateEndpointConnectionInner get(
+ String resourceGroupName, String configStoreName, String privateEndpointConnectionName) {
+ return getWithResponse(resourceGroupName, configStoreName, privateEndpointConnectionName, Context.NONE)
+ .getValue();
}
/**
- * Update the state of the specified private endpoint connection associated with the configuration store.
+ * Update the state of the specified private endpoint connection associated with the configuration store. This
+ * operation cannot be used to create a private endpoint connection. Private endpoint connections must be created
+ * with the Network resource provider.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param configStoreName The name of the configuration store.
@@ -567,7 +566,9 @@ private Mono>> createOrUpdateWithResponseAsync(
}
/**
- * Update the state of the specified private endpoint connection associated with the configuration store.
+ * Update the state of the specified private endpoint connection associated with the configuration store. This
+ * operation cannot be used to create a private endpoint connection. Private endpoint connections must be created
+ * with the Network resource provider.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param configStoreName The name of the configuration store.
@@ -636,7 +637,9 @@ private Mono>> createOrUpdateWithResponseAsync(
}
/**
- * Update the state of the specified private endpoint connection associated with the configuration store.
+ * Update the state of the specified private endpoint connection associated with the configuration store. This
+ * operation cannot be used to create a private endpoint connection. Private endpoint connections must be created
+ * with the Network resource provider.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param configStoreName The name of the configuration store.
@@ -668,7 +671,9 @@ private Mono>> createOrUpdateWithResponseAsync(
}
/**
- * Update the state of the specified private endpoint connection associated with the configuration store.
+ * Update the state of the specified private endpoint connection associated with the configuration store. This
+ * operation cannot be used to create a private endpoint connection. Private endpoint connections must be created
+ * with the Network resource provider.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param configStoreName The name of the configuration store.
@@ -703,7 +708,9 @@ private Mono>> createOrUpdateWithResponseAsync(
}
/**
- * Update the state of the specified private endpoint connection associated with the configuration store.
+ * Update the state of the specified private endpoint connection associated with the configuration store. This
+ * operation cannot be used to create a private endpoint connection. Private endpoint connections must be created
+ * with the Network resource provider.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param configStoreName The name of the configuration store.
@@ -720,13 +727,16 @@ public SyncPoller, PrivateEndpointCon
String configStoreName,
String privateEndpointConnectionName,
PrivateEndpointConnectionInner privateEndpointConnection) {
- return beginCreateOrUpdateAsync(
+ return this
+ .beginCreateOrUpdateAsync(
resourceGroupName, configStoreName, privateEndpointConnectionName, privateEndpointConnection)
.getSyncPoller();
}
/**
- * Update the state of the specified private endpoint connection associated with the configuration store.
+ * Update the state of the specified private endpoint connection associated with the configuration store. This
+ * operation cannot be used to create a private endpoint connection. Private endpoint connections must be created
+ * with the Network resource provider.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param configStoreName The name of the configuration store.
@@ -745,13 +755,16 @@ public SyncPoller, PrivateEndpointCon
String privateEndpointConnectionName,
PrivateEndpointConnectionInner privateEndpointConnection,
Context context) {
- return beginCreateOrUpdateAsync(
+ return this
+ .beginCreateOrUpdateAsync(
resourceGroupName, configStoreName, privateEndpointConnectionName, privateEndpointConnection, context)
.getSyncPoller();
}
/**
- * Update the state of the specified private endpoint connection associated with the configuration store.
+ * Update the state of the specified private endpoint connection associated with the configuration store. This
+ * operation cannot be used to create a private endpoint connection. Private endpoint connections must be created
+ * with the Network resource provider.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param configStoreName The name of the configuration store.
@@ -775,7 +788,9 @@ private Mono createOrUpdateAsync(
}
/**
- * Update the state of the specified private endpoint connection associated with the configuration store.
+ * Update the state of the specified private endpoint connection associated with the configuration store. This
+ * operation cannot be used to create a private endpoint connection. Private endpoint connections must be created
+ * with the Network resource provider.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param configStoreName The name of the configuration store.
@@ -801,7 +816,9 @@ private Mono createOrUpdateAsync(
}
/**
- * Update the state of the specified private endpoint connection associated with the configuration store.
+ * Update the state of the specified private endpoint connection associated with the configuration store. This
+ * operation cannot be used to create a private endpoint connection. Private endpoint connections must be created
+ * with the Network resource provider.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param configStoreName The name of the configuration store.
@@ -824,7 +841,9 @@ public PrivateEndpointConnectionInner createOrUpdate(
}
/**
- * Update the state of the specified private endpoint connection associated with the configuration store.
+ * Update the state of the specified private endpoint connection associated with the configuration store. This
+ * operation cannot be used to create a private endpoint connection. Private endpoint connections must be created
+ * with the Network resource provider.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param configStoreName The name of the configuration store.
@@ -1019,7 +1038,7 @@ private PollerFlux, Void> beginDeleteAsync(
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String configStoreName, String privateEndpointConnectionName) {
- return beginDeleteAsync(resourceGroupName, configStoreName, privateEndpointConnectionName).getSyncPoller();
+ return this.beginDeleteAsync(resourceGroupName, configStoreName, privateEndpointConnectionName).getSyncPoller();
}
/**
@@ -1037,7 +1056,8 @@ public SyncPoller, Void> beginDelete(
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String configStoreName, String privateEndpointConnectionName, Context context) {
- return beginDeleteAsync(resourceGroupName, configStoreName, privateEndpointConnectionName, context)
+ return this
+ .beginDeleteAsync(resourceGroupName, configStoreName, privateEndpointConnectionName, context)
.getSyncPoller();
}
@@ -1115,7 +1135,8 @@ public void delete(
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1153,7 +1174,8 @@ private Mono> listByConfigurationS
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateEndpointConnectionsImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateEndpointConnectionsImpl.java
index eb33acc0dd365..7b752de63afcb 100644
--- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateEndpointConnectionsImpl.java
+++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateEndpointConnectionsImpl.java
@@ -42,17 +42,6 @@ public PagedIterable listByConfigurationStore(
return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()));
}
- public PrivateEndpointConnection get(
- String resourceGroupName, String configStoreName, String privateEndpointConnectionName) {
- PrivateEndpointConnectionInner inner =
- this.serviceClient().get(resourceGroupName, configStoreName, privateEndpointConnectionName);
- if (inner != null) {
- return new PrivateEndpointConnectionImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getWithResponse(
String resourceGroupName, String configStoreName, String privateEndpointConnectionName, Context context) {
Response inner =
@@ -70,6 +59,17 @@ public Response getWithResponse(
}
}
+ public PrivateEndpointConnection get(
+ String resourceGroupName, String configStoreName, String privateEndpointConnectionName) {
+ PrivateEndpointConnectionInner inner =
+ this.serviceClient().get(resourceGroupName, configStoreName, privateEndpointConnectionName);
+ if (inner != null) {
+ return new PrivateEndpointConnectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
public void delete(String resourceGroupName, String configStoreName, String privateEndpointConnectionName) {
this.serviceClient().delete(resourceGroupName, configStoreName, privateEndpointConnectionName);
}
diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateLinkResourcesClientImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateLinkResourcesClientImpl.java
index 14640ff3a36f6..da69c79ef119e 100644
--- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateLinkResourcesClientImpl.java
+++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateLinkResourcesClientImpl.java
@@ -56,11 +56,10 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource
*/
@Host("{$host}")
@ServiceInterface(name = "AppConfigurationMana")
- private interface PrivateLinkResourcesService {
+ public interface PrivateLinkResourcesService {
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration"
- + "/configurationStores/{configStoreName}/privateLinkResources")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateLinkResources")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByConfigurationStore(
@@ -74,8 +73,7 @@ Mono> listByConfigurationStore(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration"
- + "/configurationStores/{configStoreName}/privateLinkResources/{groupName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateLinkResources/{groupName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> get(
@@ -422,14 +420,16 @@ private Mono getAsync(
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param configStoreName The name of the configuration store.
* @param groupName The name of the private link resource group.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a private link resource that need to be created for a configuration store.
+ * @return a private link resource that need to be created for a configuration store along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public PrivateLinkResourceInner get(String resourceGroupName, String configStoreName, String groupName) {
- return getAsync(resourceGroupName, configStoreName, groupName).block();
+ public Response getWithResponse(
+ String resourceGroupName, String configStoreName, String groupName, Context context) {
+ return getWithResponseAsync(resourceGroupName, configStoreName, groupName, context).block();
}
/**
@@ -438,22 +438,21 @@ public PrivateLinkResourceInner get(String resourceGroupName, String configStore
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param configStoreName The name of the configuration store.
* @param groupName The name of the private link resource group.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a private link resource that need to be created for a configuration store along with {@link Response}.
+ * @return a private link resource that need to be created for a configuration store.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(
- String resourceGroupName, String configStoreName, String groupName, Context context) {
- return getWithResponseAsync(resourceGroupName, configStoreName, groupName, context).block();
+ public PrivateLinkResourceInner get(String resourceGroupName, String configStoreName, String groupName) {
+ return getWithResponse(resourceGroupName, configStoreName, groupName, Context.NONE).getValue();
}
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -490,7 +489,8 @@ private Mono> listByConfigurationStoreNe
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateLinkResourcesImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateLinkResourcesImpl.java
index 6c41a2190be8d..df0cb29750eea 100644
--- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateLinkResourcesImpl.java
+++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateLinkResourcesImpl.java
@@ -42,15 +42,6 @@ public PagedIterable listByConfigurationStore(
return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
}
- public PrivateLinkResource get(String resourceGroupName, String configStoreName, String groupName) {
- PrivateLinkResourceInner inner = this.serviceClient().get(resourceGroupName, configStoreName, groupName);
- if (inner != null) {
- return new PrivateLinkResourceImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getWithResponse(
String resourceGroupName, String configStoreName, String groupName, Context context) {
Response inner =
@@ -66,6 +57,15 @@ public Response getWithResponse(
}
}
+ public PrivateLinkResource get(String resourceGroupName, String configStoreName, String groupName) {
+ PrivateLinkResourceInner inner = this.serviceClient().get(resourceGroupName, configStoreName, groupName);
+ if (inner != null) {
+ return new PrivateLinkResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
private PrivateLinkResourcesClient serviceClient() {
return this.innerClient;
}
diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ReplicaImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ReplicaImpl.java
new file mode 100644
index 0000000000000..1ec48e550c2b9
--- /dev/null
+++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ReplicaImpl.java
@@ -0,0 +1,134 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.appconfiguration.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.appconfiguration.fluent.models.ReplicaInner;
+import com.azure.resourcemanager.appconfiguration.models.Replica;
+import com.azure.resourcemanager.appconfiguration.models.ReplicaProvisioningState;
+
+public final class ReplicaImpl implements Replica, Replica.Definition {
+ private ReplicaInner innerObject;
+
+ private final com.azure.resourcemanager.appconfiguration.AppConfigurationManager serviceManager;
+
+ ReplicaImpl(
+ ReplicaInner innerObject, com.azure.resourcemanager.appconfiguration.AppConfigurationManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String endpoint() {
+ return this.innerModel().endpoint();
+ }
+
+ public ReplicaProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public ReplicaInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String configStoreName;
+
+ private String replicaName;
+
+ public ReplicaImpl withExistingConfigurationStore(String resourceGroupName, String configStoreName) {
+ this.resourceGroupName = resourceGroupName;
+ this.configStoreName = configStoreName;
+ return this;
+ }
+
+ public Replica create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getReplicas()
+ .create(resourceGroupName, configStoreName, replicaName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Replica create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getReplicas()
+ .create(resourceGroupName, configStoreName, replicaName, this.innerModel(), context);
+ return this;
+ }
+
+ ReplicaImpl(String name, com.azure.resourcemanager.appconfiguration.AppConfigurationManager serviceManager) {
+ this.innerObject = new ReplicaInner();
+ this.serviceManager = serviceManager;
+ this.replicaName = name;
+ }
+
+ public Replica refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getReplicas()
+ .getWithResponse(resourceGroupName, configStoreName, replicaName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Replica refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getReplicas()
+ .getWithResponse(resourceGroupName, configStoreName, replicaName, context)
+ .getValue();
+ return this;
+ }
+
+ public ReplicaImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public ReplicaImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+}
diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ReplicasClientImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ReplicasClientImpl.java
new file mode 100644
index 0000000000000..067d4ab0bd8b9
--- /dev/null
+++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ReplicasClientImpl.java
@@ -0,0 +1,1164 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.appconfiguration.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.appconfiguration.fluent.ReplicasClient;
+import com.azure.resourcemanager.appconfiguration.fluent.models.ReplicaInner;
+import com.azure.resourcemanager.appconfiguration.models.ReplicaListResult;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ReplicasClient. */
+public final class ReplicasClientImpl implements ReplicasClient {
+ /** The proxy service used to perform REST calls. */
+ private final ReplicasService service;
+
+ /** The service client containing this operation class. */
+ private final AppConfigurationManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ReplicasClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ReplicasClientImpl(AppConfigurationManagementClientImpl client) {
+ this.service = RestProxy.create(ReplicasService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AppConfigurationManagementClientReplicas to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AppConfigurationMana")
+ public interface ReplicasService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/replicas")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByConfigurationStore(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("configStoreName") String configStoreName,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("$skipToken") String skipToken,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/replicas/{replicaName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("configStoreName") String configStoreName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("replicaName") String replicaName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/replicas/{replicaName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("configStoreName") String configStoreName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("replicaName") String replicaName,
+ @BodyParam("application/json") ReplicaInner replicaCreationParameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/replicas/{replicaName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("configStoreName") String configStoreName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("replicaName") String replicaName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByConfigurationStoreNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists the replicas for a given configuration store.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param configStoreName The name of the configuration store.
+ * @param skipToken A skip token is used to continue retrieving items after an operation returns a partial result.
+ * If a previous response contains a nextLink element, the value of the nextLink element will include a
+ * skipToken parameter that specifies a starting point to use for subsequent calls.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 result of a request to list replicas along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByConfigurationStoreSinglePageAsync(
+ String resourceGroupName, String configStoreName, String skipToken) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (configStoreName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configStoreName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByConfigurationStore(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ configStoreName,
+ this.client.getApiVersion(),
+ skipToken,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists the replicas for a given configuration store.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param configStoreName The name of the configuration store.
+ * @param skipToken A skip token is used to continue retrieving items after an operation returns a partial result.
+ * If a previous response contains a nextLink element, the value of the nextLink element will include a
+ * skipToken parameter that specifies a starting point to use for subsequent calls.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 result of a request to list replicas along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByConfigurationStoreSinglePageAsync(
+ String resourceGroupName, String configStoreName, String skipToken, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (configStoreName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configStoreName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByConfigurationStore(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ configStoreName,
+ this.client.getApiVersion(),
+ skipToken,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists the replicas for a given configuration store.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param configStoreName The name of the configuration store.
+ * @param skipToken A skip token is used to continue retrieving items after an operation returns a partial result.
+ * If a previous response contains a nextLink element, the value of the nextLink element will include a
+ * skipToken parameter that specifies a starting point to use for subsequent calls.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 result of a request to list replicas as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByConfigurationStoreAsync(
+ String resourceGroupName, String configStoreName, String skipToken) {
+ return new PagedFlux<>(
+ () -> listByConfigurationStoreSinglePageAsync(resourceGroupName, configStoreName, skipToken),
+ nextLink -> listByConfigurationStoreNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the replicas for a given configuration store.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param configStoreName The name of the configuration store.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 result of a request to list replicas as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByConfigurationStoreAsync(String resourceGroupName, String configStoreName) {
+ final String skipToken = null;
+ return new PagedFlux<>(
+ () -> listByConfigurationStoreSinglePageAsync(resourceGroupName, configStoreName, skipToken),
+ nextLink -> listByConfigurationStoreNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the replicas for a given configuration store.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param configStoreName The name of the configuration store.
+ * @param skipToken A skip token is used to continue retrieving items after an operation returns a partial result.
+ * If a previous response contains a nextLink element, the value of the nextLink element will include a
+ * skipToken parameter that specifies a starting point to use for subsequent calls.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 result of a request to list replicas as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByConfigurationStoreAsync(
+ String resourceGroupName, String configStoreName, String skipToken, Context context) {
+ return new PagedFlux<>(
+ () -> listByConfigurationStoreSinglePageAsync(resourceGroupName, configStoreName, skipToken, context),
+ nextLink -> listByConfigurationStoreNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists the replicas for a given configuration store.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param configStoreName The name of the configuration store.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 result of a request to list replicas as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByConfigurationStore(String resourceGroupName, String configStoreName) {
+ final String skipToken = null;
+ return new PagedIterable<>(listByConfigurationStoreAsync(resourceGroupName, configStoreName, skipToken));
+ }
+
+ /**
+ * Lists the replicas for a given configuration store.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param configStoreName The name of the configuration store.
+ * @param skipToken A skip token is used to continue retrieving items after an operation returns a partial result.
+ * If a previous response contains a nextLink element, the value of the nextLink element will include a
+ * skipToken parameter that specifies a starting point to use for subsequent calls.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 result of a request to list replicas as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByConfigurationStore(
+ String resourceGroupName, String configStoreName, String skipToken, Context context) {
+ return new PagedIterable<>(
+ listByConfigurationStoreAsync(resourceGroupName, configStoreName, skipToken, context));
+ }
+
+ /**
+ * Gets the properties of the specified replica.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param configStoreName The name of the configuration store.
+ * @param replicaName The name of the replica.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 properties of the specified replica along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String configStoreName, String replicaName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (configStoreName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configStoreName is required and cannot be null."));
+ }
+ if (replicaName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ configStoreName,
+ this.client.getApiVersion(),
+ replicaName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the properties of the specified replica.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param configStoreName The name of the configuration store.
+ * @param replicaName The name of the replica.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 properties of the specified replica along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String configStoreName, String replicaName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (configStoreName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configStoreName is required and cannot be null."));
+ }
+ if (replicaName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ configStoreName,
+ this.client.getApiVersion(),
+ replicaName,
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the properties of the specified replica.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param configStoreName The name of the configuration store.
+ * @param replicaName The name of the replica.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 properties of the specified replica on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String configStoreName, String replicaName) {
+ return getWithResponseAsync(resourceGroupName, configStoreName, replicaName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets the properties of the specified replica.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param configStoreName The name of the configuration store.
+ * @param replicaName The name of the replica.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 properties of the specified replica along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String configStoreName, String replicaName, Context context) {
+ return getWithResponseAsync(resourceGroupName, configStoreName, replicaName, context).block();
+ }
+
+ /**
+ * Gets the properties of the specified replica.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param configStoreName The name of the configuration store.
+ * @param replicaName The name of the replica.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 properties of the specified replica.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ReplicaInner get(String resourceGroupName, String configStoreName, String replicaName) {
+ return getWithResponse(resourceGroupName, configStoreName, replicaName, Context.NONE).getValue();
+ }
+
+ /**
+ * Creates a replica with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param configStoreName The name of the configuration store.
+ * @param replicaName The name of the replica.
+ * @param replicaCreationParameters The parameters for creating a replica.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 replica resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String configStoreName, String replicaName, ReplicaInner replicaCreationParameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (configStoreName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configStoreName is required and cannot be null."));
+ }
+ if (replicaName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null."));
+ }
+ if (replicaCreationParameters == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter replicaCreationParameters is required and cannot be null."));
+ } else {
+ replicaCreationParameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ configStoreName,
+ this.client.getApiVersion(),
+ replicaName,
+ replicaCreationParameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates a replica with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param configStoreName The name of the configuration store.
+ * @param replicaName The name of the replica.
+ * @param replicaCreationParameters The parameters for creating a replica.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 replica resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName,
+ String configStoreName,
+ String replicaName,
+ ReplicaInner replicaCreationParameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (configStoreName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configStoreName is required and cannot be null."));
+ }
+ if (replicaName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null."));
+ }
+ if (replicaCreationParameters == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter replicaCreationParameters is required and cannot be null."));
+ } else {
+ replicaCreationParameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ configStoreName,
+ this.client.getApiVersion(),
+ replicaName,
+ replicaCreationParameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates a replica with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param configStoreName The name of the configuration store.
+ * @param replicaName The name of the replica.
+ * @param replicaCreationParameters The parameters for creating a replica.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 PollerFlux} for polling of the replica resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ReplicaInner> beginCreateAsync(
+ String resourceGroupName, String configStoreName, String replicaName, ReplicaInner replicaCreationParameters) {
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, configStoreName, replicaName, replicaCreationParameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ReplicaInner.class, ReplicaInner.class, this.client.getContext());
+ }
+
+ /**
+ * Creates a replica with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param configStoreName The name of the configuration store.
+ * @param replicaName The name of the replica.
+ * @param replicaCreationParameters The parameters for creating a replica.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 PollerFlux} for polling of the replica resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux