deleteAsync(String resourceGroupName, String builderName, Context context) {
+ return beginDeleteAsync(resourceGroupName, builderName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a BuilderResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String builderName) {
+ deleteAsync(resourceGroupName, builderName).block();
+ }
+
+ /**
+ * Delete a BuilderResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String builderName, Context context) {
+ deleteAsync(resourceGroupName, builderName, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(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.listBySubscriptionNext(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 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 DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(
+ 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
+ .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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 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 DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(
+ 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
+ .listByResourceGroupNext(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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersImpl.java
new file mode 100644
index 0000000000000..4d4d2f1276700
--- /dev/null
+++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersImpl.java
@@ -0,0 +1,170 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.appcontainers.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;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.appcontainers.fluent.BuildersClient;
+import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner;
+import com.azure.resourcemanager.appcontainers.models.BuilderResource;
+import com.azure.resourcemanager.appcontainers.models.Builders;
+
+public final class BuildersImpl implements Builders {
+ private static final ClientLogger LOGGER = new ClientLogger(BuildersImpl.class);
+
+ private final BuildersClient innerClient;
+
+ private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager;
+
+ public BuildersImpl(
+ BuildersClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager()));
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String builderName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, builderName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new BuilderResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public BuilderResource getByResourceGroup(String resourceGroupName, String builderName) {
+ BuilderResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, builderName);
+ if (inner != null) {
+ return new BuilderResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String builderName) {
+ this.serviceClient().delete(resourceGroupName, builderName);
+ }
+
+ public void delete(String resourceGroupName, String builderName, Context context) {
+ this.serviceClient().delete(resourceGroupName, builderName, context);
+ }
+
+ public BuilderResource getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String builderName = Utils.getValueFromIdByName(id, "builders");
+ if (builderName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, builderName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String builderName = Utils.getValueFromIdByName(id, "builders");
+ if (builderName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, builderName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String builderName = Utils.getValueFromIdByName(id, "builders");
+ if (builderName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id)));
+ }
+ this.delete(resourceGroupName, builderName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String builderName = Utils.getValueFromIdByName(id, "builders");
+ if (builderName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id)));
+ }
+ this.delete(resourceGroupName, builderName, context);
+ }
+
+ private BuildersClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() {
+ return this.serviceManager;
+ }
+
+ public BuilderResourceImpl define(String name) {
+ return new BuilderResourceImpl(name, this.manager());
+ }
+}
diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsClientImpl.java
new file mode 100644
index 0000000000000..874fe4662113a
--- /dev/null
+++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsClientImpl.java
@@ -0,0 +1,1286 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.appcontainers.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.Post;
+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.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.appcontainers.fluent.BuildsClient;
+import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner;
+import com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner;
+import com.azure.resourcemanager.appcontainers.models.BuildCollection;
+import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException;
+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 BuildsClient. */
+public final class BuildsClientImpl implements BuildsClient {
+ /** The proxy service used to perform REST calls. */
+ private final BuildsService service;
+
+ /** The service client containing this operation class. */
+ private final ContainerAppsApiClientImpl client;
+
+ /**
+ * Initializes an instance of BuildsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BuildsClientImpl(ContainerAppsApiClientImpl client) {
+ this.service = RestProxy.create(BuildsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ContainerAppsApiClientBuilds to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ContainerAppsApiClie")
+ public interface BuildsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
+ Mono> listByBuilderResource(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("builderName") String builderName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("builderName") String builderName,
+ @PathParam("buildName") String buildName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("builderName") String builderName,
+ @PathParam("buildName") String buildName,
+ @BodyParam("application/json") BuildResourceInner buildEnvelope,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("builderName") String builderName,
+ @PathParam("buildName") String buildName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}/getAuthToken")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
+ Mono> getAuthToken(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("builderName") String builderName,
+ @PathParam("buildName") String buildName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
+ Mono> listByBuilderResourceNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List BuildResource resources by BuilderResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a BuildResource list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByBuilderResourceSinglePageAsync(
+ String resourceGroupName, String builderName) {
+ 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 (builderName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByBuilderResource(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ builderName,
+ 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()));
+ }
+
+ /**
+ * List BuildResource resources by BuilderResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a BuildResource list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByBuilderResourceSinglePageAsync(
+ String resourceGroupName, String builderName, 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 (builderName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByBuilderResource(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ builderName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List BuildResource resources by BuilderResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a BuildResource list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByBuilderResourceAsync(String resourceGroupName, String builderName) {
+ return new PagedFlux<>(
+ () -> listByBuilderResourceSinglePageAsync(resourceGroupName, builderName),
+ nextLink -> listByBuilderResourceNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List BuildResource resources by BuilderResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a BuildResource list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByBuilderResourceAsync(
+ String resourceGroupName, String builderName, Context context) {
+ return new PagedFlux<>(
+ () -> listByBuilderResourceSinglePageAsync(resourceGroupName, builderName, context),
+ nextLink -> listByBuilderResourceNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List BuildResource resources by BuilderResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByBuilderResource(String resourceGroupName, String builderName) {
+ return new PagedIterable<>(listByBuilderResourceAsync(resourceGroupName, builderName));
+ }
+
+ /**
+ * List BuildResource resources by BuilderResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByBuilderResource(
+ String resourceGroupName, String builderName, Context context) {
+ return new PagedIterable<>(listByBuilderResourceAsync(resourceGroupName, builderName, context));
+ }
+
+ /**
+ * Get a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a BuildResource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String builderName, String buildName) {
+ 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 (builderName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null."));
+ }
+ if (buildName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ builderName,
+ buildName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a BuildResource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String builderName, String buildName, 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 (builderName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null."));
+ }
+ if (buildName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ builderName,
+ buildName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a BuildResource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String builderName, String buildName) {
+ return getWithResponseAsync(resourceGroupName, builderName, buildName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a BuildResource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String builderName, String buildName, Context context) {
+ return getWithResponseAsync(resourceGroupName, builderName, buildName, context).block();
+ }
+
+ /**
+ * Get a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a BuildResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BuildResourceInner get(String resourceGroupName, String builderName, String buildName) {
+ return getWithResponse(resourceGroupName, builderName, buildName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param buildEnvelope Resource create or update parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information pertaining to an individual build along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope) {
+ 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 (builderName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null."));
+ }
+ if (buildName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null."));
+ }
+ if (buildEnvelope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter buildEnvelope is required and cannot be null."));
+ } else {
+ buildEnvelope.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ builderName,
+ buildName,
+ buildEnvelope,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param buildEnvelope Resource create or update parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information pertaining to an individual build along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String builderName,
+ String buildName,
+ BuildResourceInner buildEnvelope,
+ 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 (builderName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null."));
+ }
+ if (buildName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null."));
+ }
+ if (buildEnvelope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter buildEnvelope is required and cannot be null."));
+ } else {
+ buildEnvelope.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ builderName,
+ buildName,
+ buildEnvelope,
+ accept,
+ context);
+ }
+
+ /**
+ * Create a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param buildEnvelope Resource create or update parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException 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 information pertaining to an individual build.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, BuildResourceInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, builderName, buildName, buildEnvelope);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ BuildResourceInner.class,
+ BuildResourceInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param buildEnvelope Resource create or update parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException 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 information pertaining to an individual build.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, BuildResourceInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String builderName,
+ String buildName,
+ BuildResourceInner buildEnvelope,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, builderName, buildName, buildEnvelope, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), BuildResourceInner.class, BuildResourceInner.class, context);
+ }
+
+ /**
+ * Create a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param buildEnvelope Resource create or update parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of information pertaining to an individual build.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, BuildResourceInner> beginCreateOrUpdate(
+ String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope).getSyncPoller();
+ }
+
+ /**
+ * Create a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param buildEnvelope Resource create or update parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of information pertaining to an individual build.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, BuildResourceInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String builderName,
+ String buildName,
+ BuildResourceInner buildEnvelope,
+ Context context) {
+ return this
+ .beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param buildEnvelope Resource create or update parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information pertaining to an individual build on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope) {
+ return beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param buildEnvelope Resource create or update parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information pertaining to an individual build on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String builderName,
+ String buildName,
+ BuildResourceInner buildEnvelope,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param buildEnvelope Resource create or update parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information pertaining to an individual build.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BuildResourceInner createOrUpdate(
+ String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope) {
+ return createOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope).block();
+ }
+
+ /**
+ * Create a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param buildEnvelope Resource create or update parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information pertaining to an individual build.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BuildResourceInner createOrUpdate(
+ String resourceGroupName,
+ String builderName,
+ String buildName,
+ BuildResourceInner buildEnvelope,
+ Context context) {
+ return createOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope, context).block();
+ }
+
+ /**
+ * Delete a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException 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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String builderName, String buildName) {
+ 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 (builderName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null."));
+ }
+ if (buildName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ builderName,
+ buildName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException 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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String builderName, String buildName, 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 (builderName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null."));
+ }
+ if (buildName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ builderName,
+ buildName,
+ accept,
+ context);
+ }
+
+ /**
+ * Delete a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException 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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String builderName, String buildName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, builderName, buildName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Delete a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException 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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String builderName, String buildName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, builderName, buildName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String builderName, String buildName) {
+ return this.beginDeleteAsync(resourceGroupName, builderName, buildName).getSyncPoller();
+ }
+
+ /**
+ * Delete a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String builderName, String buildName, Context context) {
+ return this.beginDeleteAsync(resourceGroupName, builderName, buildName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String builderName, String buildName) {
+ return beginDeleteAsync(resourceGroupName, builderName, buildName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String builderName, String buildName, Context context) {
+ return beginDeleteAsync(resourceGroupName, builderName, buildName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String builderName, String buildName) {
+ deleteAsync(resourceGroupName, builderName, buildName).block();
+ }
+
+ /**
+ * Delete a BuildResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String builderName, String buildName, Context context) {
+ deleteAsync(resourceGroupName, builderName, buildName, context).block();
+ }
+
+ /**
+ * Gets the token used to connect to the endpoint where source code can be uploaded for a build.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the token used to connect to the endpoint where source code can be uploaded for a build along with {@link
+ * Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getAuthTokenWithResponseAsync(
+ String resourceGroupName, String builderName, String buildName) {
+ 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 (builderName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null."));
+ }
+ if (buildName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getAuthToken(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ builderName,
+ buildName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the token used to connect to the endpoint where source code can be uploaded for a build.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the token used to connect to the endpoint where source code can be uploaded for a build along with {@link
+ * Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getAuthTokenWithResponseAsync(
+ String resourceGroupName, String builderName, String buildName, 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 (builderName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null."));
+ }
+ if (buildName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getAuthToken(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ builderName,
+ buildName,
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the token used to connect to the endpoint where source code can be uploaded for a build.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the token used to connect to the endpoint where source code can be uploaded for a build on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAuthTokenAsync(String resourceGroupName, String builderName, String buildName) {
+ return getAuthTokenWithResponseAsync(resourceGroupName, builderName, buildName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets the token used to connect to the endpoint where source code can be uploaded for a build.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the token used to connect to the endpoint where source code can be uploaded for a build along with {@link
+ * Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getAuthTokenWithResponse(
+ String resourceGroupName, String builderName, String buildName, Context context) {
+ return getAuthTokenWithResponseAsync(resourceGroupName, builderName, buildName, context).block();
+ }
+
+ /**
+ * Gets the token used to connect to the endpoint where source code can be uploaded for a build.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param buildName The name of a build.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the token used to connect to the endpoint where source code can be uploaded for a build.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BuildTokenInner getAuthToken(String resourceGroupName, String builderName, String buildName) {
+ return getAuthTokenWithResponse(resourceGroupName, builderName, buildName, Context.NONE).getValue();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a BuildResource list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByBuilderResourceNextSinglePageAsync(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.listByBuilderResourceNext(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 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 DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a BuildResource list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByBuilderResourceNextSinglePageAsync(
+ 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
+ .listByBuilderResourceNext(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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsImpl.java
new file mode 100644
index 0000000000000..37f12e9ebc401
--- /dev/null
+++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsImpl.java
@@ -0,0 +1,216 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.appcontainers.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;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.appcontainers.fluent.BuildsClient;
+import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner;
+import com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner;
+import com.azure.resourcemanager.appcontainers.models.BuildResource;
+import com.azure.resourcemanager.appcontainers.models.BuildToken;
+import com.azure.resourcemanager.appcontainers.models.Builds;
+
+public final class BuildsImpl implements Builds {
+ private static final ClientLogger LOGGER = new ClientLogger(BuildsImpl.class);
+
+ private final BuildsClient innerClient;
+
+ private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager;
+
+ public BuildsImpl(
+ BuildsClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByBuilderResource(String resourceGroupName, String builderName) {
+ PagedIterable inner =
+ this.serviceClient().listByBuilderResource(resourceGroupName, builderName);
+ return Utils.mapPage(inner, inner1 -> new BuildResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByBuilderResource(
+ String resourceGroupName, String builderName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByBuilderResource(resourceGroupName, builderName, context);
+ return Utils.mapPage(inner, inner1 -> new BuildResourceImpl(inner1, this.manager()));
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String builderName, String buildName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, builderName, buildName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new BuildResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public BuildResource get(String resourceGroupName, String builderName, String buildName) {
+ BuildResourceInner inner = this.serviceClient().get(resourceGroupName, builderName, buildName);
+ if (inner != null) {
+ return new BuildResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String builderName, String buildName) {
+ this.serviceClient().delete(resourceGroupName, builderName, buildName);
+ }
+
+ public void delete(String resourceGroupName, String builderName, String buildName, Context context) {
+ this.serviceClient().delete(resourceGroupName, builderName, buildName, context);
+ }
+
+ public Response getAuthTokenWithResponse(
+ String resourceGroupName, String builderName, String buildName, Context context) {
+ Response inner =
+ this.serviceClient().getAuthTokenWithResponse(resourceGroupName, builderName, buildName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new BuildTokenImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public BuildToken getAuthToken(String resourceGroupName, String builderName, String buildName) {
+ BuildTokenInner inner = this.serviceClient().getAuthToken(resourceGroupName, builderName, buildName);
+ if (inner != null) {
+ return new BuildTokenImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public BuildResource getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String builderName = Utils.getValueFromIdByName(id, "builders");
+ if (builderName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id)));
+ }
+ String buildName = Utils.getValueFromIdByName(id, "builds");
+ if (buildName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, builderName, buildName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String builderName = Utils.getValueFromIdByName(id, "builders");
+ if (builderName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id)));
+ }
+ String buildName = Utils.getValueFromIdByName(id, "builds");
+ if (buildName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, builderName, buildName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String builderName = Utils.getValueFromIdByName(id, "builders");
+ if (builderName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id)));
+ }
+ String buildName = Utils.getValueFromIdByName(id, "builds");
+ if (buildName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id)));
+ }
+ this.delete(resourceGroupName, builderName, buildName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String builderName = Utils.getValueFromIdByName(id, "builders");
+ if (builderName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id)));
+ }
+ String buildName = Utils.getValueFromIdByName(id, "builds");
+ if (buildName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id)));
+ }
+ this.delete(resourceGroupName, builderName, buildName, context);
+ }
+
+ private BuildsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() {
+ return this.serviceManager;
+ }
+
+ public BuildResourceImpl define(String name) {
+ return new BuildResourceImpl(name, this.manager());
+ }
+}
diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java
index 4e0adba8acb47..6b49e3cdead7f 100644
--- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java
+++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java
@@ -4,6 +4,7 @@
package com.azure.resourcemanager.appcontainers.implementation;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner;
import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorage;
@@ -31,6 +32,10 @@ public ConnectedEnvironmentStorageProperties properties() {
return this.innerModel().properties();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public String resourceGroupName() {
return resourceGroupName;
}
diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java
index 3289bbba92736..09bd5311c2a3c 100644
--- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java
+++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java
@@ -24,6 +24,8 @@
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.appcontainers.fluent.AvailableWorkloadProfilesClient;
import com.azure.resourcemanager.appcontainers.fluent.BillingMetersClient;
+import com.azure.resourcemanager.appcontainers.fluent.BuildersClient;
+import com.azure.resourcemanager.appcontainers.fluent.BuildsClient;
import com.azure.resourcemanager.appcontainers.fluent.CertificatesClient;
import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsCertificatesClient;
import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsClient;
@@ -41,12 +43,15 @@
import com.azure.resourcemanager.appcontainers.fluent.JobsExecutionsClient;
import com.azure.resourcemanager.appcontainers.fluent.ManagedCertificatesClient;
import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentDiagnosticsClient;
+import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentUsagesClient;
import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsClient;
import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsDiagnosticsClient;
import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsStoragesClient;
import com.azure.resourcemanager.appcontainers.fluent.NamespacesClient;
import com.azure.resourcemanager.appcontainers.fluent.OperationsClient;
+import com.azure.resourcemanager.appcontainers.fluent.PatchesClient;
import com.azure.resourcemanager.appcontainers.fluent.ResourceProvidersClient;
+import com.azure.resourcemanager.appcontainers.fluent.UsagesClient;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
@@ -167,6 +172,30 @@ public BillingMetersClient getBillingMeters() {
return this.billingMeters;
}
+ /** The BuildersClient object to access its operations. */
+ private final BuildersClient builders;
+
+ /**
+ * Gets the BuildersClient object to access its operations.
+ *
+ * @return the BuildersClient object.
+ */
+ public BuildersClient getBuilders() {
+ return this.builders;
+ }
+
+ /** The BuildsClient object to access its operations. */
+ private final BuildsClient builds;
+
+ /**
+ * Gets the BuildsClient object to access its operations.
+ *
+ * @return the BuildsClient object.
+ */
+ public BuildsClient getBuilds() {
+ return this.builds;
+ }
+
/** The ConnectedEnvironmentsClient object to access its operations. */
private final ConnectedEnvironmentsClient connectedEnvironments;
@@ -407,6 +436,18 @@ public ManagedEnvironmentsStoragesClient getManagedEnvironmentsStorages() {
return this.managedEnvironmentsStorages;
}
+ /** The PatchesClient object to access its operations. */
+ private final PatchesClient patches;
+
+ /**
+ * Gets the PatchesClient object to access its operations.
+ *
+ * @return the PatchesClient object.
+ */
+ public PatchesClient getPatches() {
+ return this.patches;
+ }
+
/** The ContainerAppsSourceControlsClient object to access its operations. */
private final ContainerAppsSourceControlsClient containerAppsSourceControls;
@@ -419,6 +460,30 @@ public ContainerAppsSourceControlsClient getContainerAppsSourceControls() {
return this.containerAppsSourceControls;
}
+ /** The UsagesClient object to access its operations. */
+ private final UsagesClient usages;
+
+ /**
+ * Gets the UsagesClient object to access its operations.
+ *
+ * @return the UsagesClient object.
+ */
+ public UsagesClient getUsages() {
+ return this.usages;
+ }
+
+ /** The ManagedEnvironmentUsagesClient object to access its operations. */
+ private final ManagedEnvironmentUsagesClient managedEnvironmentUsages;
+
+ /**
+ * Gets the ManagedEnvironmentUsagesClient object to access its operations.
+ *
+ * @return the ManagedEnvironmentUsagesClient object.
+ */
+ public ManagedEnvironmentUsagesClient getManagedEnvironmentUsages() {
+ return this.managedEnvironmentUsages;
+ }
+
/**
* Initializes an instance of ContainerAppsApiClient client.
*
@@ -441,10 +506,12 @@ public ContainerAppsSourceControlsClient getContainerAppsSourceControls() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2023-05-01";
+ this.apiVersion = "2023-08-01-preview";
this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsClientImpl(this);
this.availableWorkloadProfiles = new AvailableWorkloadProfilesClientImpl(this);
this.billingMeters = new BillingMetersClientImpl(this);
+ this.builders = new BuildersClientImpl(this);
+ this.builds = new BuildsClientImpl(this);
this.connectedEnvironments = new ConnectedEnvironmentsClientImpl(this);
this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesClientImpl(this);
this.connectedEnvironmentsDaprComponents = new ConnectedEnvironmentsDaprComponentsClientImpl(this);
@@ -465,7 +532,10 @@ public ContainerAppsSourceControlsClient getContainerAppsSourceControls() {
this.namespaces = new NamespacesClientImpl(this);
this.daprComponents = new DaprComponentsClientImpl(this);
this.managedEnvironmentsStorages = new ManagedEnvironmentsStoragesClientImpl(this);
+ this.patches = new PatchesClientImpl(this);
this.containerAppsSourceControls = new ContainerAppsSourceControlsClientImpl(this);
+ this.usages = new UsagesClientImpl(this);
+ this.managedEnvironmentUsages = new ManagedEnvironmentUsagesClientImpl(this);
}
/**
diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java
index 9afafdafa4c73..f397f21dd8e33 100644
--- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java
+++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java
@@ -5,9 +5,11 @@
package com.azure.resourcemanager.appcontainers.implementation;
import com.azure.core.http.rest.Response;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner;
import com.azure.resourcemanager.appcontainers.models.DaprComponent;
+import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding;
import com.azure.resourcemanager.appcontainers.models.DaprMetadata;
import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection;
import com.azure.resourcemanager.appcontainers.models.Secret;
@@ -31,6 +33,10 @@ public String type() {
return this.innerModel().type();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public String componentType() {
return this.innerModel().componentType();
}
@@ -78,6 +84,15 @@ public List scopes() {
}
}
+ public List serviceComponentBind() {
+ List inner = this.innerModel().serviceComponentBind();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
public String resourceGroupName() {
return resourceGroupName;
}
@@ -238,4 +253,9 @@ public DaprComponentImpl withScopes(List scopes) {
this.innerModel().withScopes(scopes);
return this;
}
+
+ public DaprComponentImpl withServiceComponentBind(List serviceComponentBind) {
+ this.innerModel().withServiceComponentBind(serviceComponentBind);
+ return this;
+ }
}
diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java
index 40453e7de9471..593d62d7018a3 100644
--- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java
+++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java
@@ -4,6 +4,7 @@
package com.azure.resourcemanager.appcontainers.implementation;
+import com.azure.core.management.SystemData;
import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner;
import com.azure.resourcemanager.appcontainers.models.Diagnostics;
import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties;
@@ -35,6 +36,10 @@ public DiagnosticsProperties properties() {
return this.innerModel().properties();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public DiagnosticsInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java
index 1d0877490ef02..64e204a65f451 100644
--- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java
+++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java
@@ -9,6 +9,7 @@
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner;
+import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration;
import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration;
import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration;
import com.azure.resourcemanager.appcontainers.models.DaprConfiguration;
@@ -17,6 +18,7 @@
import com.azure.resourcemanager.appcontainers.models.KedaConfiguration;
import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment;
import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication;
+import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration;
import com.azure.resourcemanager.appcontainers.models.VnetConfiguration;
import com.azure.resourcemanager.appcontainers.models.WorkloadProfile;
import java.util.Collections;
@@ -94,6 +96,14 @@ public AppLogsConfiguration appLogsConfiguration() {
return this.innerModel().appLogsConfiguration();
}
+ public AppInsightsConfiguration appInsightsConfiguration() {
+ return this.innerModel().appInsightsConfiguration();
+ }
+
+ public OpenTelemetryConfiguration openTelemetryConfiguration() {
+ return this.innerModel().openTelemetryConfiguration();
+ }
+
public Boolean zoneRedundant() {
return this.innerModel().zoneRedundant();
}
@@ -286,6 +296,17 @@ public ManagedEnvironmentImpl withAppLogsConfiguration(AppLogsConfiguration appL
return this;
}
+ public ManagedEnvironmentImpl withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration) {
+ this.innerModel().withAppInsightsConfiguration(appInsightsConfiguration);
+ return this;
+ }
+
+ public ManagedEnvironmentImpl withOpenTelemetryConfiguration(
+ OpenTelemetryConfiguration openTelemetryConfiguration) {
+ this.innerModel().withOpenTelemetryConfiguration(openTelemetryConfiguration);
+ return this;
+ }
+
public ManagedEnvironmentImpl withZoneRedundant(Boolean zoneRedundant) {
this.innerModel().withZoneRedundant(zoneRedundant);
return this;
diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java
index dc5d0b9e1ee45..06812b119670a 100644
--- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java
+++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java
@@ -4,6 +4,7 @@
package com.azure.resourcemanager.appcontainers.implementation;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner;
import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorage;
@@ -31,6 +32,10 @@ public ManagedEnvironmentStorageProperties properties() {
return this.innerModel().properties();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public String resourceGroupName() {
return resourceGroupName;
}
diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesClientImpl.java
new file mode 100644
index 0000000000000..f9c18c51d1fa9
--- /dev/null
+++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesClientImpl.java
@@ -0,0 +1,342 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.appcontainers.implementation;
+
+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.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.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentUsagesClient;
+import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner;
+import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException;
+import com.azure.resourcemanager.appcontainers.models.ListUsagesResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ManagedEnvironmentUsagesClient. */
+public final class ManagedEnvironmentUsagesClientImpl implements ManagedEnvironmentUsagesClient {
+ /** The proxy service used to perform REST calls. */
+ private final ManagedEnvironmentUsagesService service;
+
+ /** The service client containing this operation class. */
+ private final ContainerAppsApiClientImpl client;
+
+ /**
+ * Initializes an instance of ManagedEnvironmentUsagesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ManagedEnvironmentUsagesClientImpl(ContainerAppsApiClientImpl client) {
+ this.service =
+ RestProxy
+ .create(ManagedEnvironmentUsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentUsages to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ContainerAppsApiClie")
+ public interface ManagedEnvironmentUsagesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/usages")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("environmentName") String environmentName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets the current usage information as well as the limits for environment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param environmentName Name of the Environment.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current usage information as well as the limits for environment along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName, String environmentName) {
+ 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 (environmentName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ environmentName,
+ this.client.getApiVersion(),
+ 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()));
+ }
+
+ /**
+ * Gets the current usage information as well as the limits for environment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param environmentName Name of the Environment.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current usage information as well as the limits for environment along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String environmentName, 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 (environmentName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ environmentName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets the current usage information as well as the limits for environment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param environmentName Name of the Environment.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current usage information as well as the limits for environment as paginated response with {@link
+ * PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String environmentName) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, environmentName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets the current usage information as well as the limits for environment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param environmentName Name of the Environment.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current usage information as well as the limits for environment as paginated response with {@link
+ * PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String environmentName, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, environmentName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets the current usage information as well as the limits for environment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param environmentName Name of the Environment.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current usage information as well as the limits for environment as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String environmentName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, environmentName));
+ }
+
+ /**
+ * Gets the current usage information as well as the limits for environment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param environmentName Name of the Environment.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current usage information as well as the limits for environment as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String environmentName, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(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.listNext(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 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 DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(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
+ .listNext(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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesImpl.java
new file mode 100644
index 0000000000000..32babed5c4df4
--- /dev/null
+++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesImpl.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.appcontainers.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentUsagesClient;
+import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner;
+import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentUsages;
+import com.azure.resourcemanager.appcontainers.models.Usage;
+
+public final class ManagedEnvironmentUsagesImpl implements ManagedEnvironmentUsages {
+ private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentUsagesImpl.class);
+
+ private final ManagedEnvironmentUsagesClient innerClient;
+
+ private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager;
+
+ public ManagedEnvironmentUsagesImpl(
+ ManagedEnvironmentUsagesClient innerClient,
+ com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceGroupName, String environmentName) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName);
+ return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String environmentName, Context context) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName, context);
+ return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager()));
+ }
+
+ private ManagedEnvironmentUsagesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchCollectionImpl.java
new file mode 100644
index 0000000000000..ed456f3fc9595
--- /dev/null
+++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchCollectionImpl.java
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.appcontainers.implementation;
+
+import com.azure.resourcemanager.appcontainers.fluent.models.PatchCollectionInner;
+import com.azure.resourcemanager.appcontainers.fluent.models.PatchResourceInner;
+import com.azure.resourcemanager.appcontainers.models.PatchCollection;
+import com.azure.resourcemanager.appcontainers.models.PatchResource;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public final class PatchCollectionImpl implements PatchCollection {
+ private PatchCollectionInner innerObject;
+
+ private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager;
+
+ PatchCollectionImpl(
+ PatchCollectionInner innerObject,
+ com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List value() {
+ List inner = this.innerModel().value();
+ if (inner != null) {
+ return Collections
+ .unmodifiableList(
+ inner
+ .stream()
+ .map(inner1 -> new PatchResourceImpl(inner1, this.manager()))
+ .collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public String nextLink() {
+ return this.innerModel().nextLink();
+ }
+
+ public PatchCollectionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchResourceImpl.java
new file mode 100644
index 0000000000000..9bc814b83189c
--- /dev/null
+++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchResourceImpl.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.appcontainers.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.appcontainers.fluent.models.PatchResourceInner;
+import com.azure.resourcemanager.appcontainers.models.PatchProperties;
+import com.azure.resourcemanager.appcontainers.models.PatchResource;
+
+public final class PatchResourceImpl implements PatchResource {
+ private PatchResourceInner innerObject;
+
+ private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager;
+
+ PatchResourceImpl(
+ PatchResourceInner innerObject,
+ com.azure.resourcemanager.appcontainers.ContainerAppsApiManager 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 PatchProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public PatchResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchesClientImpl.java
new file mode 100644
index 0000000000000..475ec63db061a
--- /dev/null
+++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchesClientImpl.java
@@ -0,0 +1,1225 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.appcontainers.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.Post;
+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.Response;
+import com.azure.core.http.rest.RestProxy;
+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.appcontainers.fluent.PatchesClient;
+import com.azure.resourcemanager.appcontainers.fluent.models.PatchCollectionInner;
+import com.azure.resourcemanager.appcontainers.fluent.models.PatchResourceInner;
+import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException;
+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 PatchesClient. */
+public final class PatchesClientImpl implements PatchesClient {
+ /** The proxy service used to perform REST calls. */
+ private final PatchesService service;
+
+ /** The service client containing this operation class. */
+ private final ContainerAppsApiClientImpl client;
+
+ /**
+ * Initializes an instance of PatchesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PatchesClientImpl(ContainerAppsApiClientImpl client) {
+ this.service = RestProxy.create(PatchesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ContainerAppsApiClientPatches to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ContainerAppsApiClie")
+ public interface PatchesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
+ Mono> listByBuilderResource(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("builderName") String builderName,
+ @QueryParam("$filter") String filter,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("builderName") String builderName,
+ @PathParam("patchName") String patchName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("builderName") String builderName,
+ @PathParam("patchName") String patchName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscription/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}/skipConfig")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
+ Mono>> skipConfigure(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("builderName") String builderName,
+ @PathParam("patchName") String patchName,
+ @BodyParam("application/json") boolean patchSkipConfig,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}/apply")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
+ Mono>> apply(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("builderName") String builderName,
+ @PathParam("patchName") String patchName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List PatchResource resources by BuilderResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param filter The filter to apply on the operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return container App SourceToCloud patch collection along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByBuilderResourceWithResponseAsync(
+ String resourceGroupName, String builderName, String filter) {
+ 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 (builderName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByBuilderResource(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ builderName,
+ filter,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List PatchResource resources by BuilderResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param filter The filter to apply on the operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return container App SourceToCloud patch collection along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByBuilderResourceWithResponseAsync(
+ String resourceGroupName, String builderName, String filter, 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 (builderName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByBuilderResource(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ builderName,
+ filter,
+ accept,
+ context);
+ }
+
+ /**
+ * List PatchResource resources by BuilderResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return container App SourceToCloud patch collection on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listByBuilderResourceAsync(String resourceGroupName, String builderName) {
+ final String filter = null;
+ return listByBuilderResourceWithResponseAsync(resourceGroupName, builderName, filter)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * List PatchResource resources by BuilderResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param filter The filter to apply on the operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return container App SourceToCloud patch collection along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listByBuilderResourceWithResponse(
+ String resourceGroupName, String builderName, String filter, Context context) {
+ return listByBuilderResourceWithResponseAsync(resourceGroupName, builderName, filter, context).block();
+ }
+
+ /**
+ * List PatchResource resources by BuilderResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return container App SourceToCloud patch collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PatchCollectionInner listByBuilderResource(String resourceGroupName, String builderName) {
+ final String filter = null;
+ return listByBuilderResourceWithResponse(resourceGroupName, builderName, filter, Context.NONE).getValue();
+ }
+
+ /**
+ * Get details for specific patch by patch name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param patchName The name of the patch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details for specific patch by patch name along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String builderName, String patchName) {
+ 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 (builderName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null."));
+ }
+ if (patchName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ builderName,
+ patchName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get details for specific patch by patch name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param patchName The name of the patch.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details for specific patch by patch name along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String builderName, String patchName, 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 (builderName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null."));
+ }
+ if (patchName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ builderName,
+ patchName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get details for specific patch by patch name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param patchName The name of the patch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details for specific patch by patch name on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String builderName, String patchName) {
+ return getWithResponseAsync(resourceGroupName, builderName, patchName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get details for specific patch by patch name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param patchName The name of the patch.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details for specific patch by patch name along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String builderName, String patchName, Context context) {
+ return getWithResponseAsync(resourceGroupName, builderName, patchName, context).block();
+ }
+
+ /**
+ * Get details for specific patch by patch name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param patchName The name of the patch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details for specific patch by patch name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PatchResourceInner get(String resourceGroupName, String builderName, String patchName) {
+ return getWithResponse(resourceGroupName, builderName, patchName, Context.NONE).getValue();
+ }
+
+ /**
+ * Delete specific patch by patch name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param patchName The name of the patch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException 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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String builderName, String patchName) {
+ 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 (builderName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null."));
+ }
+ if (patchName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ builderName,
+ patchName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete specific patch by patch name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param patchName The name of the patch.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException 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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String builderName, String patchName, 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 (builderName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null."));
+ }
+ if (patchName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ builderName,
+ patchName,
+ accept,
+ context);
+ }
+
+ /**
+ * Delete specific patch by patch name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param patchName The name of the patch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException 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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String builderName, String patchName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, builderName, patchName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Delete specific patch by patch name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param patchName The name of the patch.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException 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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String builderName, String patchName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, builderName, patchName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete specific patch by patch name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param patchName The name of the patch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String builderName, String patchName) {
+ return this.beginDeleteAsync(resourceGroupName, builderName, patchName).getSyncPoller();
+ }
+
+ /**
+ * Delete specific patch by patch name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param patchName The name of the patch.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String builderName, String patchName, Context context) {
+ return this.beginDeleteAsync(resourceGroupName, builderName, patchName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete specific patch by patch name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param builderName The name of the builder.
+ * @param patchName The name of the patch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono