Skip to content

Commit

Permalink
Mgmt Appplatform: update and change some API (Azure#14365)
Browse files Browse the repository at this point in the history
* update api-spec

* generate app platform

* fix compile error and update api

* update service when needed

* add active deployment api

* remove deploy from app

* remove setting from other deployment

* remove useless impl

* fix test

* remove compression

* compress to test

* fix test

* update test

* deployment with instance

* update test

* prepare for post run

* fix checkstyle

* fix spotbug
  • Loading branch information
ChenTanyi authored Aug 25, 2020
1 parent b6fb4cb commit 6176e3f
Show file tree
Hide file tree
Showing 41 changed files with 4,091 additions and 1,219 deletions.
2 changes: 1 addition & 1 deletion sdk/resourcemanager/api-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dir": "azure-resourcemanager-appplatform",
"source": "specification/appplatform/resource-manager/readme.md",
"package": "com.azure.resourcemanager.appplatform",
"args": "--payload-flattening-threshold=1 --tag=package-2019-05-01-preview --remove-inner=TestKeys,ResourceSku,ResourceUploadDefinition,CustomDomainValidateResult,NameAvailability"
"args": "--payload-flattening-threshold=1 --tag=package-2020-07 --remove-inner=TestKeys,ResourceSku,ResourceUploadDefinition,CustomDomainValidateResult,NameAvailability"
},
"appservice": {
"dir": "azure-resourcemanager-appservice",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/piggymetrics
/piggymetrics.tar.gz
# folder created in unit test
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.20</version> <!-- {x-version-update;org.apache.commons:commons-compress;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
import com.azure.resourcemanager.appplatform.fluent.AppsClient;
import com.azure.resourcemanager.appplatform.fluent.BindingsClient;
import com.azure.resourcemanager.appplatform.fluent.CertificatesClient;
import com.azure.resourcemanager.appplatform.fluent.ConfigServersClient;
import com.azure.resourcemanager.appplatform.fluent.CustomDomainsClient;
import com.azure.resourcemanager.appplatform.fluent.DeploymentsClient;
import com.azure.resourcemanager.appplatform.fluent.MonitoringSettingsClient;
import com.azure.resourcemanager.appplatform.fluent.OperationsClient;
import com.azure.resourcemanager.appplatform.fluent.ServicesClient;
import com.azure.resourcemanager.appplatform.fluent.SkusClient;
Expand Down Expand Up @@ -113,6 +115,30 @@ public ServicesClient getServices() {
return this.services;
}

/** The ConfigServersClient object to access its operations. */
private final ConfigServersClient configServers;

/**
* Gets the ConfigServersClient object to access its operations.
*
* @return the ConfigServersClient object.
*/
public ConfigServersClient getConfigServers() {
return this.configServers;
}

/** The MonitoringSettingsClient object to access its operations. */
private final MonitoringSettingsClient monitoringSettings;

/**
* Gets the MonitoringSettingsClient object to access its operations.
*
* @return the MonitoringSettingsClient object.
*/
public MonitoringSettingsClient getMonitoringSettings() {
return this.monitoringSettings;
}

/** The AppsClient object to access its operations. */
private final AppsClient apps;

Expand Down Expand Up @@ -218,8 +244,10 @@ public SkusClient getSkus() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
this.apiVersion = "2019-05-01-preview";
this.apiVersion = "2020-07-01";
this.services = new ServicesClient(this);
this.configServers = new ConfigServersClient(this);
this.monitoringSettings = new MonitoringSettingsClient(this);
this.apps = new AppsClient(this);
this.bindings = new BindingsClient(this);
this.certificates = new CertificatesClient(this);
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Mono<Response<ServiceResourceInner>> getByResourceGroup(
@Put(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring"
+ "/{serviceName}")
@ExpectedResponses({200, 201})
@ExpectedResponses({200, 201, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<Flux<ByteBuffer>>> createOrUpdate(
@HostParam("$host") String endpoint,
Expand Down Expand Up @@ -1563,6 +1563,8 @@ public TestKeys regenerateTestKey(
}

/**
* Disable test endpoint functionality for a Service.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
Expand Down Expand Up @@ -1607,6 +1609,8 @@ public Mono<Response<Void>> disableTestEndpointWithResponseAsync(String resource
}

/**
* Disable test endpoint functionality for a Service.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
Expand Down Expand Up @@ -1650,6 +1654,8 @@ public Mono<Response<Void>> disableTestEndpointWithResponseAsync(
}

/**
* Disable test endpoint functionality for a Service.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
Expand All @@ -1665,6 +1671,8 @@ public Mono<Void> disableTestEndpointAsync(String resourceGroupName, String serv
}

/**
* Disable test endpoint functionality for a Service.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
Expand All @@ -1681,6 +1689,8 @@ public Mono<Void> disableTestEndpointAsync(String resourceGroupName, String serv
}

/**
* Disable test endpoint functionality for a Service.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
Expand All @@ -1694,6 +1704,8 @@ public void disableTestEndpoint(String resourceGroupName, String serviceName) {
}

/**
* Disable test endpoint functionality for a Service.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
Expand All @@ -1708,6 +1720,8 @@ public void disableTestEndpoint(String resourceGroupName, String serviceName, Co
}

/**
* Enable test endpoint functionality for a Service.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
Expand Down Expand Up @@ -1752,6 +1766,8 @@ public Mono<Response<TestKeys>> enableTestEndpointWithResponseAsync(String resou
}

/**
* Enable test endpoint functionality for a Service.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
Expand Down Expand Up @@ -1795,6 +1811,8 @@ public Mono<Response<TestKeys>> enableTestEndpointWithResponseAsync(
}

/**
* Enable test endpoint functionality for a Service.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
Expand All @@ -1817,6 +1835,8 @@ public Mono<TestKeys> enableTestEndpointAsync(String resourceGroupName, String s
}

/**
* Enable test endpoint functionality for a Service.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
Expand All @@ -1840,6 +1860,8 @@ public Mono<TestKeys> enableTestEndpointAsync(String resourceGroupName, String s
}

/**
* Enable test endpoint functionality for a Service.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
Expand All @@ -1854,6 +1876,8 @@ public TestKeys enableTestEndpoint(String resourceGroupName, String serviceName)
}

/**
* Enable test endpoint functionality for a Service.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ Mono<Response<ResourceSkuCollectionInner>> listNext(
}

/**
* Lists all of the available skus of the Microsoft.AppPlatform provider.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
* @return object that includes an array of Azure Spring Cloud SKU and a possible link for next set.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<PagedResponse<ResourceSku>> listSinglePageAsync() {
Expand Down Expand Up @@ -116,11 +118,13 @@ public Mono<PagedResponse<ResourceSku>> listSinglePageAsync() {
}

/**
* Lists all of the available skus of the Microsoft.AppPlatform provider.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
* @return object that includes an array of Azure Spring Cloud SKU and a possible link for next set.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<PagedResponse<ResourceSku>> listSinglePageAsync(Context context) {
Expand Down Expand Up @@ -151,21 +155,25 @@ public Mono<PagedResponse<ResourceSku>> listSinglePageAsync(Context context) {
}

/**
* Lists all of the available skus of the Microsoft.AppPlatform provider.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
* @return object that includes an array of Azure Spring Cloud SKU and a possible link for next set.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<ResourceSku> listAsync() {
return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
}

/**
* Lists all of the available skus of the Microsoft.AppPlatform provider.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
* @return object that includes an array of Azure Spring Cloud SKU and a possible link for next set.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<ResourceSku> listAsync(Context context) {
Expand All @@ -174,21 +182,25 @@ public PagedFlux<ResourceSku> listAsync(Context context) {
}

/**
* Lists all of the available skus of the Microsoft.AppPlatform provider.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
* @return object that includes an array of Azure Spring Cloud SKU and a possible link for next set.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ResourceSku> list() {
return new PagedIterable<>(listAsync());
}

/**
* Lists all of the available skus of the Microsoft.AppPlatform provider.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
* @return object that includes an array of Azure Spring Cloud SKU and a possible link for next set.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ResourceSku> list(Context context) {
Expand All @@ -202,7 +214,7 @@ public PagedIterable<ResourceSku> list(Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
* @return object that includes an array of Azure Spring Cloud SKU and a possible link for next set.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<PagedResponse<ResourceSku>> listNextSinglePageAsync(String nextLink) {
Expand Down Expand Up @@ -231,7 +243,7 @@ public Mono<PagedResponse<ResourceSku>> listNextSinglePageAsync(String nextLink)
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
* @return object that includes an array of Azure Spring Cloud SKU and a possible link for next set.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<PagedResponse<ResourceSku>> listNextSinglePageAsync(String nextLink, Context context) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.appplatform.fluent.inner;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.appplatform.models.ConfigServerProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The ConfigServerResource model. */
@Fluent
public final class ConfigServerResourceInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigServerResourceInner.class);

/*
* Properties of the Config Server resource
*/
@JsonProperty(value = "properties")
private ConfigServerProperties properties;

/**
* Get the properties property: Properties of the Config Server resource.
*
* @return the properties value.
*/
public ConfigServerProperties properties() {
return this.properties;
}

/**
* Set the properties property: Properties of the Config Server resource.
*
* @param properties the properties value to set.
* @return the ConfigServerResourceInner object itself.
*/
public ConfigServerResourceInner withProperties(ConfigServerProperties properties) {
this.properties = properties;
return this;
}

/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (properties() != null) {
properties().validate();
}
}
}
Loading

0 comments on commit 6176e3f

Please sign in to comment.