Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR sdk/hdinsight/mgmt-v2018_06_01_preview] Dev containerservice microsoft.container service 2020 04 01 rebased latest master branch #3164

Open
wants to merge 1 commit into
base: sdkAutomation/sdk_hdinsight_mgmt-v2018_06_01_preview
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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