Skip to content

Commit

Permalink
mgmt, regen code (Azure#15251)
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft authored Sep 17, 2020
1 parent c5b09fb commit d55f3d9
Show file tree
Hide file tree
Showing 695 changed files with 9,160 additions and 5,055 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,18 @@ public OperationsClient getOperations() {
return this.operations;
}

/** The RuntimeVersionsClient object to access its operations. */
private final RuntimeVersionsClient runtimeVersions;

/**
* Gets the RuntimeVersionsClient object to access its operations.
*
* @return the RuntimeVersionsClient object.
*/
public RuntimeVersionsClient getRuntimeVersions() {
return this.runtimeVersions;
}

/** The SkusClient object to access its operations. */
private final SkusClient skus;

Expand Down Expand Up @@ -244,6 +256,7 @@ public SkusClient getSkus() {
this.customDomains = new CustomDomainsClient(this);
this.deployments = new DeploymentsClient(this);
this.operations = new OperationsClient(this);
this.runtimeVersions = new RuntimeVersionsClient(this);
this.skus = new SkusClient(this);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,22 @@ public AppPlatformManagementClientBuilder environment(AzureEnvironment environme
return this;
}

/*
* The default poll interval for long-running operation
*/
private Duration defaultPollInterval;

/**
* Sets The default poll interval for long-running operation.
*
* @param defaultPollInterval the defaultPollInterval value.
* @return the AppPlatformManagementClientBuilder.
*/
public AppPlatformManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = defaultPollInterval;
return this;
}

/*
* The HTTP pipeline to send requests through
*/
Expand Down Expand Up @@ -101,22 +117,6 @@ public AppPlatformManagementClientBuilder serializerAdapter(SerializerAdapter se
return this;
}

/*
* The default poll interval for long-running operation
*/
private Duration defaultPollInterval;

/**
* Sets The default poll interval for long-running operation.
*
* @param defaultPollInterval the defaultPollInterval value.
* @return the AppPlatformManagementClientBuilder.
*/
public AppPlatformManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = defaultPollInterval;
return this;
}

/**
* Builds an instance of AppPlatformManagementClient with the provided parameters.
*
Expand All @@ -129,6 +129,9 @@ public AppPlatformManagementClient buildClient() {
if (environment == null) {
this.environment = AzureEnvironment.AZURE;
}
if (defaultPollInterval == null) {
this.defaultPollInterval = Duration.ofSeconds(30);
}
if (pipeline == null) {
this.pipeline =
new HttpPipelineBuilder()
Expand All @@ -138,9 +141,6 @@ public AppPlatformManagementClient buildClient() {
if (serializerAdapter == null) {
this.serializerAdapter = new AzureJacksonAdapter();
}
if (defaultPollInterval == null) {
this.defaultPollInterval = Duration.ofSeconds(30);
}
AppPlatformManagementClient client =
new AppPlatformManagementClient(
pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.appplatform.fluent.inner.AppResourceCollectionInner;
import com.azure.resourcemanager.appplatform.fluent.inner.AppResourceInner;
import com.azure.resourcemanager.appplatform.models.AppResourceCollection;
import com.azure.resourcemanager.appplatform.models.CustomDomainValidatePayload;
import com.azure.resourcemanager.appplatform.models.CustomDomainValidateResult;
import com.azure.resourcemanager.appplatform.models.ResourceUploadDefinition;
Expand All @@ -57,7 +57,7 @@ public final class AppsClient {
*
* @param client the instance of the service client containing this operation class.
*/
public AppsClient(AppPlatformManagementClient client) {
AppsClient(AppPlatformManagementClient client) {
this.service = RestProxy.create(AppsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
Expand Down Expand Up @@ -138,7 +138,7 @@ Mono<Response<Flux<ByteBuffer>>> update(
+ "/{serviceName}/apps")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<AppResourceCollectionInner>> list(
Mono<Response<AppResourceCollection>> list(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
Expand Down Expand Up @@ -181,7 +181,7 @@ Mono<Response<CustomDomainValidateResult>> validateDomain(
@Get("{nextLink}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<AppResourceCollectionInner>> listNext(
Mono<Response<AppResourceCollection>> listNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
}

Expand Down Expand Up @@ -398,17 +398,16 @@ public AppResourceInner get(String resourceGroupName, String serviceName, String
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
* @param appName The name of the App resource.
* @param syncStatus Indicates whether sync status.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return an App and its properties.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public AppResourceInner get(
String resourceGroupName, String serviceName, String appName, String syncStatus, Context context) {
return getAsync(resourceGroupName, serviceName, appName, syncStatus, context).block();
public AppResourceInner get(String resourceGroupName, String serviceName, String appName) {
final String syncStatus = null;
final Context context = null;
return getAsync(resourceGroupName, serviceName, appName, syncStatus).block();
}

/**
Expand All @@ -418,16 +417,17 @@ public AppResourceInner get(
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
* @param appName The name of the App resource.
* @param syncStatus Indicates whether sync status.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return an App and its properties.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public AppResourceInner get(String resourceGroupName, String serviceName, String appName) {
final String syncStatus = null;
final Context context = null;
return getAsync(resourceGroupName, serviceName, appName, syncStatus).block();
public AppResourceInner get(
String resourceGroupName, String serviceName, String appName, String syncStatus, Context context) {
return getAsync(resourceGroupName, serviceName, appName, syncStatus, context).block();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.appplatform.fluent.inner.BindingResourceCollectionInner;
import com.azure.resourcemanager.appplatform.fluent.inner.BindingResourceInner;
import com.azure.resourcemanager.appplatform.models.BindingResourceCollection;
import com.azure.resourcemanager.appplatform.models.BindingResourceProperties;
import java.nio.ByteBuffer;
import reactor.core.publisher.Flux;
Expand All @@ -54,7 +54,7 @@ public final class BindingsClient {
*
* @param client the instance of the service client containing this operation class.
*/
public BindingsClient(AppPlatformManagementClient client) {
BindingsClient(AppPlatformManagementClient client) {
this.service = RestProxy.create(BindingsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
Expand Down Expand Up @@ -138,7 +138,7 @@ Mono<Response<Flux<ByteBuffer>>> update(
+ "/{serviceName}/apps/{appName}/bindings")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<BindingResourceCollectionInner>> list(
Mono<Response<BindingResourceCollection>> list(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
Expand All @@ -151,7 +151,7 @@ Mono<Response<BindingResourceCollectionInner>> list(
@Get("{nextLink}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<BindingResourceCollectionInner>> listNext(
Mono<Response<BindingResourceCollection>> listNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.appplatform.fluent.inner.CertificateResourceCollectionInner;
import com.azure.resourcemanager.appplatform.fluent.inner.CertificateResourceInner;
import com.azure.resourcemanager.appplatform.models.CertificateProperties;
import com.azure.resourcemanager.appplatform.models.CertificateResourceCollection;
import java.nio.ByteBuffer;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
Expand All @@ -53,7 +53,7 @@ public final class CertificatesClient {
*
* @param client the instance of the service client containing this operation class.
*/
public CertificatesClient(AppPlatformManagementClient client) {
CertificatesClient(AppPlatformManagementClient client) {
this.service =
RestProxy.create(CertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
Expand Down Expand Up @@ -118,7 +118,7 @@ Mono<Response<Flux<ByteBuffer>>> delete(
+ "/{serviceName}/certificates")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<CertificateResourceCollectionInner>> list(
Mono<Response<CertificateResourceCollection>> list(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
Expand All @@ -130,7 +130,7 @@ Mono<Response<CertificateResourceCollectionInner>> list(
@Get("{nextLink}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<CertificateResourceCollectionInner>> listNext(
Mono<Response<CertificateResourceCollection>> listNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public final class ConfigServersClient {
*
* @param client the instance of the service client containing this operation class.
*/
public ConfigServersClient(AppPlatformManagementClient client) {
ConfigServersClient(AppPlatformManagementClient client) {
this.service =
RestProxy.create(ConfigServersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.appplatform.fluent.inner.CustomDomainResourceCollectionInner;
import com.azure.resourcemanager.appplatform.fluent.inner.CustomDomainResourceInner;
import com.azure.resourcemanager.appplatform.models.CustomDomainProperties;
import com.azure.resourcemanager.appplatform.models.CustomDomainResourceCollection;
import java.nio.ByteBuffer;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
Expand All @@ -54,7 +54,7 @@ public final class CustomDomainsClient {
*
* @param client the instance of the service client containing this operation class.
*/
public CustomDomainsClient(AppPlatformManagementClient client) {
CustomDomainsClient(AppPlatformManagementClient client) {
this.service =
RestProxy.create(CustomDomainsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
Expand Down Expand Up @@ -139,7 +139,7 @@ Mono<Response<Flux<ByteBuffer>>> update(
+ "/{serviceName}/apps/{appName}/domains")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<CustomDomainResourceCollectionInner>> list(
Mono<Response<CustomDomainResourceCollection>> list(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
Expand All @@ -152,7 +152,7 @@ Mono<Response<CustomDomainResourceCollectionInner>> list(
@Get("{nextLink}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<CustomDomainResourceCollectionInner>> listNext(
Mono<Response<CustomDomainResourceCollection>> listNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
import com.azure.core.util.polling.SyncPoller;
import com.azure.core.util.serializer.CollectionFormat;
import com.azure.core.util.serializer.JacksonAdapter;
import com.azure.resourcemanager.appplatform.fluent.inner.DeploymentResourceCollectionInner;
import com.azure.resourcemanager.appplatform.fluent.inner.DeploymentResourceInner;
import com.azure.resourcemanager.appplatform.fluent.inner.LogFileUrlResponseInner;
import com.azure.resourcemanager.appplatform.models.DeploymentResourceCollection;
import java.nio.ByteBuffer;
import java.util.List;
import reactor.core.publisher.Flux;
Expand All @@ -58,7 +58,7 @@ public final class DeploymentsClient {
*
* @param client the instance of the service client containing this operation class.
*/
public DeploymentsClient(AppPlatformManagementClient client) {
DeploymentsClient(AppPlatformManagementClient client) {
this.service =
RestProxy.create(DeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
Expand Down Expand Up @@ -143,7 +143,7 @@ Mono<Response<Flux<ByteBuffer>>> update(
+ "/{serviceName}/apps/{appName}/deployments")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<DeploymentResourceCollectionInner>> list(
Mono<Response<DeploymentResourceCollection>> list(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
Expand All @@ -159,7 +159,7 @@ Mono<Response<DeploymentResourceCollectionInner>> list(
+ "/{serviceName}/deployments")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<DeploymentResourceCollectionInner>> listForCluster(
Mono<Response<DeploymentResourceCollection>> listForCluster(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
Expand Down Expand Up @@ -236,14 +236,14 @@ Mono<Response<LogFileUrlResponseInner>> getLogFileUrl(
@Get("{nextLink}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<DeploymentResourceCollectionInner>> listNext(
Mono<Response<DeploymentResourceCollection>> listNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, Context context);

@Headers({"Accept: application/json", "Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<DeploymentResourceCollectionInner>> listForClusterNext(
Mono<Response<DeploymentResourceCollection>> listForClusterNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public final class MonitoringSettingsClient {
*
* @param client the instance of the service client containing this operation class.
*/
public MonitoringSettingsClient(AppPlatformManagementClient client) {
MonitoringSettingsClient(AppPlatformManagementClient client) {
this.service =
RestProxy.create(MonitoringSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.appplatform.fluent.inner.AvailableOperationsInner;
import com.azure.resourcemanager.appplatform.fluent.inner.OperationDetailInner;
import com.azure.resourcemanager.appplatform.models.AvailableOperations;
import reactor.core.publisher.Mono;

/** An instance of this class provides access to all the operations defined in Operations. */
Expand All @@ -44,7 +44,7 @@ public final class OperationsClient {
*
* @param client the instance of the service client containing this operation class.
*/
public OperationsClient(AppPlatformManagementClient client) {
OperationsClient(AppPlatformManagementClient client) {
this.service =
RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
Expand All @@ -61,14 +61,14 @@ private interface OperationsService {
@Get("/providers/Microsoft.AppPlatform/operations")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<AvailableOperationsInner>> list(
Mono<Response<AvailableOperations>> list(
@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, Context context);

@Headers({"Accept: application/json", "Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<AvailableOperationsInner>> listNext(
Mono<Response<AvailableOperations>> listNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
}

Expand Down
Loading

0 comments on commit d55f3d9

Please sign in to comment.