Skip to content

Commit

Permalink
Generated from d43ef1e2fdb28e5a1199efe4916e264843b07728
Browse files Browse the repository at this point in the history
[AKS] Apply patch from 0301 API version to 0401 (#9412)
  • Loading branch information
SDK Automation committed May 15, 2020
1 parent f35a9b1 commit 7f0b5fc
Show file tree
Hide file tree
Showing 10 changed files with 594 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/hdinsight/mgmt-v2018_06_01_preview/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.2.0</version>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
</parent>
<artifactId>azure-mgmt-hdinsight</artifactId>
<version>1.3.1</version>
<version>1.0.0-beta</version>
<packaging>jar</packaging>
<name>Microsoft Azure SDK for HDInsight Management</name>
<description>This package contains Microsoft HDInsight Management SDK.</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.hdinsight.v2018_06_01_preview;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The cluster host information.
*/
public class HostInfo {
/**
* The host name.
*/
@JsonProperty(value = "name")
private String name;

/**
* Get the host name.
*
* @return the name value
*/
public String name() {
return this.name;
}

/**
* Set the host name.
*
* @param name the name value to set
* @return the HostInfo object itself.
*/
public HostInfo withName(String name) {
this.name = name;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.hdinsight.v2018_06_01_preview;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.implementation.HDInsightManager;
import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.implementation.HostInfoListResultInner;
import java.util.List;

/**
* Type representing HostInfoListResult.
*/
public interface HostInfoListResult extends HasInner<HostInfoListResultInner>, HasManager<HDInsightManager> {
/**
* @return the value value.
*/
List<HostInfo> value();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.hdinsight.v2018_06_01_preview;

import rx.Completable;
import rx.Observable;
import java.util.List;
import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.implementation.VirtualMachinesInner;
import com.microsoft.azure.arm.model.HasInner;

/**
* Type representing VirtualMachines.
*/
public interface VirtualMachines extends HasInner<VirtualMachinesInner> {
/**
* Lists the HDInsight clusters hosts.
*
* @param resourceGroupName The name of the resource group.
* @param clusterName The name of the cluster.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<HostInfoListResult> listHostsAsync(String resourceGroupName, String clusterName);

/**
* Restarts the specified HDInsight cluster hosts.
*
* @param resourceGroupName The name of the resource group.
* @param clusterName The name of the cluster.
* @param hosts The list of hosts to restart
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Completable restartHostsAsync(String resourceGroupName, String clusterName, List<String> hosts);

}
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,19 @@ public OperationsInner operations() {
return this.operations;
}

/**
* The VirtualMachinesInner object to access its operations.
*/
private VirtualMachinesInner virtualMachines;

/**
* Gets the VirtualMachinesInner object to access its operations.
* @return the VirtualMachinesInner object.
*/
public VirtualMachinesInner virtualMachines() {
return this.virtualMachines;
}

/**
* Initializes an instance of HDInsightManagementClient client.
*
Expand Down Expand Up @@ -279,6 +292,7 @@ protected void initialize() {
this.scriptActions = new ScriptActionsInner(restClient().retrofit(), this);
this.scriptExecutionHistorys = new ScriptExecutionHistorysInner(restClient().retrofit(), this);
this.operations = new OperationsInner(restClient().retrofit(), this);
this.virtualMachines = new VirtualMachinesInner(restClient().retrofit(), this);
this.azureClient = new AzureClient(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.ScriptActions;
import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.ScriptExecutionHistorys;
import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.Operations;
import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.VirtualMachines;
import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl;
import com.microsoft.azure.arm.resources.implementation.ManagerCore;

Expand All @@ -39,6 +40,7 @@ public final class HDInsightManager extends ManagerCore<HDInsightManager, HDInsi
private ScriptActions scriptActions;
private ScriptExecutionHistorys scriptExecutionHistorys;
private Operations operations;
private VirtualMachines virtualMachines;
/**
* Get a Configurable instance that can be used to create HDInsightManager with optional configuration.
*
Expand Down Expand Up @@ -166,6 +168,16 @@ public Operations operations() {
return this.operations;
}

/**
* @return Entry point to manage VirtualMachines.
*/
public VirtualMachines virtualMachines() {
if (this.virtualMachines == null) {
this.virtualMachines = new VirtualMachinesImpl(this);
}
return this.virtualMachines;
}

/**
* The implementation for Configurable interface.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.hdinsight.v2018_06_01_preview.implementation;

import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.HostInfoListResult;
import com.microsoft.azure.arm.model.implementation.WrapperImpl;
import java.util.List;
import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.HostInfo;

class HostInfoListResultImpl extends WrapperImpl<HostInfoListResultInner> implements HostInfoListResult {
private final HDInsightManager manager;
HostInfoListResultImpl(HostInfoListResultInner inner, HDInsightManager manager) {
super(inner);
this.manager = manager;
}

@Override
public HDInsightManager manager() {
return this.manager;
}

@Override
public List<HostInfo> value() {
return this.inner().value();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.hdinsight.v2018_06_01_preview.implementation;

import java.util.List;
import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.HostInfo;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Result of the request to list cluster hosts.
*/
public class HostInfoListResultInner {
/**
* The list of cluster hosts.
*/
@JsonProperty(value = "value")
private List<HostInfo> value;

/**
* Get the list of cluster hosts.
*
* @return the value value
*/
public List<HostInfo> value() {
return this.value;
}

/**
* Set the list of cluster hosts.
*
* @param value the value value to set
* @return the HostInfoListResultInner object itself.
*/
public HostInfoListResultInner withValue(List<HostInfo> value) {
this.value = value;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* abc
*/

package com.microsoft.azure.management.hdinsight.v2018_06_01_preview.implementation;

import com.microsoft.azure.arm.model.implementation.WrapperImpl;
import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.VirtualMachines;
import rx.Completable;
import rx.functions.Func1;
import rx.Observable;
import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.HostInfoListResult;
import java.util.List;

class VirtualMachinesImpl extends WrapperImpl<VirtualMachinesInner> implements VirtualMachines {
private final HDInsightManager manager;

VirtualMachinesImpl(HDInsightManager manager) {
super(manager.inner().virtualMachines());
this.manager = manager;
}

public HDInsightManager manager() {
return this.manager;
}

@Override
public Observable<HostInfoListResult> listHostsAsync(String resourceGroupName, String clusterName) {
VirtualMachinesInner client = this.inner();
return client.listHostsAsync(resourceGroupName, clusterName)
.map(new Func1<HostInfoListResultInner, HostInfoListResult>() {
@Override
public HostInfoListResult call(HostInfoListResultInner inner) {
return new HostInfoListResultImpl(inner, manager());
}
});
}

@Override
public Completable restartHostsAsync(String resourceGroupName, String clusterName, List<String> hosts) {
VirtualMachinesInner client = this.inner();
return client.restartHostsAsync(resourceGroupName, clusterName, hosts).toCompletable();
}

}
Loading

0 comments on commit 7f0b5fc

Please sign in to comment.