Skip to content

Commit

Permalink
Update from master
Browse files Browse the repository at this point in the history
  • Loading branch information
SDK Automation committed Jul 17, 2020
1 parent 045cc86 commit 48a153f
Show file tree
Hide file tree
Showing 11 changed files with 274 additions and 75 deletions.
4 changes: 2 additions & 2 deletions sdk/containerservice/mgmt-v2019_08_01/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.2.0</version>
<relativePath>../../parents/azure-arm-parent</relativePath>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
</parent>
<artifactId>azure-mgmt-containerservice</artifactId>
<version>1.0.0-beta</version>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@ public interface AgentPools extends SupportsCreating<AgentPool.DefinitionStages.
*
* @param resourceGroupName The name of the resource group.
* @param resourceName The name of the managed cluster resource.
* @param agentPoolName The name of the agent pool.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<AgentPoolAvailableVersions> getAvailableAgentPoolVersionsAsync(String resourceGroupName, String resourceName, String agentPoolName);
Observable<AgentPoolAvailableVersions> getAvailableAgentPoolVersionsAsync(String resourceGroupName, String resourceName);

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public class ManagedClusterAgentPoolProfileProperties {
* Number of agents (VMs) to host docker containers. Allowed values must be
* in the range of 1 to 100 (inclusive). The default value is 1.
*/
@JsonProperty(value = "count", required = true)
private int count;
@JsonProperty(value = "count")
private Integer count;

/**
* Size of agent VMs. Possible values include: 'Standard_A1',
Expand Down Expand Up @@ -76,7 +76,7 @@ public class ManagedClusterAgentPoolProfileProperties {
* 'Standard_ND24s', 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24',
* 'Standard_NV6'.
*/
@JsonProperty(value = "vmSize", required = true)
@JsonProperty(value = "vmSize")
private ContainerServiceVMSizeTypes vmSize;

/**
Expand Down Expand Up @@ -184,7 +184,7 @@ public class ManagedClusterAgentPoolProfileProperties {
*
* @return the count value
*/
public int count() {
public Integer count() {
return this.count;
}

Expand All @@ -194,7 +194,7 @@ public int count() {
* @param count the count value to set
* @return the ManagedClusterAgentPoolProfileProperties object itself.
*/
public ManagedClusterAgentPoolProfileProperties withCount(int count) {
public ManagedClusterAgentPoolProfileProperties withCount(Integer count) {
this.count = count;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ public interface ManagedClusters extends SupportsCreating<ManagedCluster.Definit
*/
Completable resetAADProfileAsync(String resourceGroupName, String resourceName, ManagedClusterAADProfile parameters);

/**
* Rotate certificates of a managed cluster.
* Rotate certificates of a managed cluster.
*
* @param resourceGroupName The name of the resource group.
* @param resourceName The name of the managed cluster resource.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Completable rotateClusterCertificatesAsync(String resourceGroupName, String resourceName);

/**
* Gets upgrade profile for a managed cluster.
* Gets the details of the upgrade profile for a managed cluster with a specified resource group and name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public List<String> availabilityZones() {
}

@Override
public int count() {
public Integer count() {
return this.inner().count();
}

Expand Down Expand Up @@ -182,18 +182,6 @@ public AgentPoolImpl withExistingManagedCluster(String resourceGroupName, String
return this;
}

@Override
public AgentPoolImpl withCount(int count) {
this.inner().withCount(count);
return this;
}

@Override
public AgentPoolImpl withVmSize(ContainerServiceVMSizeTypes vmSize) {
this.inner().withVmSize(vmSize);
return this;
}

@Override
public AgentPoolImpl withAgentPoolType(AgentPoolType agentPoolType) {
this.inner().withAgentPoolType(agentPoolType);
Expand All @@ -206,6 +194,12 @@ public AgentPoolImpl withAvailabilityZones(List<String> availabilityZones) {
return this;
}

@Override
public AgentPoolImpl withCount(Integer count) {
this.inner().withCount(count);
return this;
}

@Override
public AgentPoolImpl withEnableAutoScaling(Boolean enableAutoScaling) {
this.inner().withEnableAutoScaling(enableAutoScaling);
Expand Down Expand Up @@ -272,6 +266,12 @@ public AgentPoolImpl withScaleSetPriority(ScaleSetPriority scaleSetPriority) {
return this;
}

@Override
public AgentPoolImpl withVmSize(ContainerServiceVMSizeTypes vmSize) {
this.inner().withVmSize(vmSize);
return this;
}

@Override
public AgentPoolImpl withVnetSubnetID(String vnetSubnetID) {
this.inner().withVnetSubnetID(vnetSubnetID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public class AgentPoolInner extends SubResource {
* Number of agents (VMs) to host docker containers. Allowed values must be
* in the range of 1 to 100 (inclusive). The default value is 1.
*/
@JsonProperty(value = "properties.count", required = true)
private int count;
@JsonProperty(value = "properties.count")
private Integer count;

/**
* Size of agent VMs. Possible values include: 'Standard_A1',
Expand Down Expand Up @@ -84,7 +84,7 @@ public class AgentPoolInner extends SubResource {
* 'Standard_ND24s', 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24',
* 'Standard_NV6'.
*/
@JsonProperty(value = "properties.vmSize", required = true)
@JsonProperty(value = "properties.vmSize")
private ContainerServiceVMSizeTypes vmSize;

/**
Expand Down Expand Up @@ -205,7 +205,7 @@ public class AgentPoolInner extends SubResource {
*
* @return the count value
*/
public int count() {
public Integer count() {
return this.count;
}

Expand All @@ -215,7 +215,7 @@ public int count() {
* @param count the count value to set
* @return the AgentPoolInner object itself.
*/
public AgentPoolInner withCount(int count) {
public AgentPoolInner withCount(Integer count) {
this.count = count;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ public AgentPoolUpgradeProfile call(AgentPoolUpgradeProfileInner inner) {
}

@Override
public Observable<AgentPoolAvailableVersions> getAvailableAgentPoolVersionsAsync(String resourceGroupName, String resourceName, String agentPoolName) {
public Observable<AgentPoolAvailableVersions> getAvailableAgentPoolVersionsAsync(String resourceGroupName, String resourceName) {
AgentPoolsInner client = this.inner();
return client.getAvailableAgentPoolVersionsAsync(resourceGroupName, resourceName, agentPoolName)
return client.getAvailableAgentPoolVersionsAsync(resourceGroupName, resourceName)
.map(new Func1<AgentPoolAvailableVersionsInner, AgentPoolAvailableVersions>() {
@Override
public AgentPoolAvailableVersions call(AgentPoolAvailableVersionsInner inner) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ interface AgentPoolsService {
Observable<Response<ResponseBody>> getUpgradeProfile(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("agentPoolName") String agentPoolName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_08_01.AgentPools getAvailableAgentPoolVersions" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/availableAgentPoolVersions")
Observable<Response<ResponseBody>> getAvailableAgentPoolVersions(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("agentPoolName") String agentPoolName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions")
Observable<Response<ResponseBody>> getAvailableAgentPoolVersions(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_08_01.AgentPools listNext" })
@GET
Expand Down Expand Up @@ -783,14 +783,13 @@ private ServiceResponse<AgentPoolUpgradeProfileInner> getUpgradeProfileDelegate(
*
* @param resourceGroupName The name of the resource group.
* @param resourceName The name of the managed cluster resource.
* @param agentPoolName The name of the agent pool.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the AgentPoolAvailableVersionsInner object if successful.
*/
public AgentPoolAvailableVersionsInner getAvailableAgentPoolVersions(String resourceGroupName, String resourceName, String agentPoolName) {
return getAvailableAgentPoolVersionsWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).toBlocking().single().body();
public AgentPoolAvailableVersionsInner getAvailableAgentPoolVersions(String resourceGroupName, String resourceName) {
return getAvailableAgentPoolVersionsWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body();
}

/**
Expand All @@ -799,13 +798,12 @@ public AgentPoolAvailableVersionsInner getAvailableAgentPoolVersions(String reso
*
* @param resourceGroupName The name of the resource group.
* @param resourceName The name of the managed cluster resource.
* @param agentPoolName The name of the agent pool.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<AgentPoolAvailableVersionsInner> getAvailableAgentPoolVersionsAsync(String resourceGroupName, String resourceName, String agentPoolName, final ServiceCallback<AgentPoolAvailableVersionsInner> serviceCallback) {
return ServiceFuture.fromResponse(getAvailableAgentPoolVersionsWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName), serviceCallback);
public ServiceFuture<AgentPoolAvailableVersionsInner> getAvailableAgentPoolVersionsAsync(String resourceGroupName, String resourceName, final ServiceCallback<AgentPoolAvailableVersionsInner> serviceCallback) {
return ServiceFuture.fromResponse(getAvailableAgentPoolVersionsWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback);
}

/**
Expand All @@ -814,12 +812,11 @@ public ServiceFuture<AgentPoolAvailableVersionsInner> getAvailableAgentPoolVersi
*
* @param resourceGroupName The name of the resource group.
* @param resourceName The name of the managed cluster resource.
* @param agentPoolName The name of the agent pool.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the AgentPoolAvailableVersionsInner object
*/
public Observable<AgentPoolAvailableVersionsInner> getAvailableAgentPoolVersionsAsync(String resourceGroupName, String resourceName, String agentPoolName) {
return getAvailableAgentPoolVersionsWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).map(new Func1<ServiceResponse<AgentPoolAvailableVersionsInner>, AgentPoolAvailableVersionsInner>() {
public Observable<AgentPoolAvailableVersionsInner> getAvailableAgentPoolVersionsAsync(String resourceGroupName, String resourceName) {
return getAvailableAgentPoolVersionsWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<AgentPoolAvailableVersionsInner>, AgentPoolAvailableVersionsInner>() {
@Override
public AgentPoolAvailableVersionsInner call(ServiceResponse<AgentPoolAvailableVersionsInner> response) {
return response.body();
Expand All @@ -833,11 +830,10 @@ public AgentPoolAvailableVersionsInner call(ServiceResponse<AgentPoolAvailableVe
*
* @param resourceGroupName The name of the resource group.
* @param resourceName The name of the managed cluster resource.
* @param agentPoolName The name of the agent pool.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the AgentPoolAvailableVersionsInner object
*/
public Observable<ServiceResponse<AgentPoolAvailableVersionsInner>> getAvailableAgentPoolVersionsWithServiceResponseAsync(String resourceGroupName, String resourceName, String agentPoolName) {
public Observable<ServiceResponse<AgentPoolAvailableVersionsInner>> getAvailableAgentPoolVersionsWithServiceResponseAsync(String resourceGroupName, String resourceName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
Expand All @@ -847,11 +843,8 @@ public Observable<ServiceResponse<AgentPoolAvailableVersionsInner>> getAvailable
if (resourceName == null) {
throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
}
if (agentPoolName == null) {
throw new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.");
}
final String apiVersion = "2019-08-01";
return service.getAvailableAgentPoolVersions(this.client.subscriptionId(), resourceGroupName, resourceName, agentPoolName, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
return service.getAvailableAgentPoolVersions(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<AgentPoolAvailableVersionsInner>>>() {
@Override
public Observable<ServiceResponse<AgentPoolAvailableVersionsInner>> call(Response<ResponseBody> response) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ public Completable resetAADProfileAsync(String resourceGroupName, String resourc
return client.resetAADProfileAsync(resourceGroupName, resourceName, parameters).toCompletable();
}

@Override
public Completable rotateClusterCertificatesAsync(String resourceGroupName, String resourceName) {
ManagedClustersInner client = this.inner();
return client.rotateClusterCertificatesAsync(resourceGroupName, resourceName).toCompletable();
}

@Override
protected ManagedClusterImpl wrapModel(ManagedClusterInner inner) {
return new ManagedClusterImpl(inner.name(), inner, manager());
Expand Down
Loading

0 comments on commit 48a153f

Please sign in to comment.