
com.azure.resourcemanager.hdinsight.models.ClusterMonitoringRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-hdinsight Show documentation
Show all versions of azure-resourcemanager-hdinsight Show documentation
This package contains Microsoft Azure SDK for HDInsight Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. HDInsight Management Client. Package tag package-2021-06.
The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.hdinsight.models;
import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
/**
* The cluster monitor parameters.
*/
@Fluent
public final class ClusterMonitoringRequest implements JsonSerializable {
/*
* The cluster monitor workspace ID.
*/
private String workspaceId;
/*
* The cluster monitor workspace key.
*/
private String primaryKey;
/**
* Creates an instance of ClusterMonitoringRequest class.
*/
public ClusterMonitoringRequest() {
}
/**
* Get the workspaceId property: The cluster monitor workspace ID.
*
* @return the workspaceId value.
*/
public String workspaceId() {
return this.workspaceId;
}
/**
* Set the workspaceId property: The cluster monitor workspace ID.
*
* @param workspaceId the workspaceId value to set.
* @return the ClusterMonitoringRequest object itself.
*/
public ClusterMonitoringRequest withWorkspaceId(String workspaceId) {
this.workspaceId = workspaceId;
return this;
}
/**
* Get the primaryKey property: The cluster monitor workspace key.
*
* @return the primaryKey value.
*/
public String primaryKey() {
return this.primaryKey;
}
/**
* Set the primaryKey property: The cluster monitor workspace key.
*
* @param primaryKey the primaryKey value to set.
* @return the ClusterMonitoringRequest object itself.
*/
public ClusterMonitoringRequest withPrimaryKey(String primaryKey) {
this.primaryKey = primaryKey;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("workspaceId", this.workspaceId);
jsonWriter.writeStringField("primaryKey", this.primaryKey);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of ClusterMonitoringRequest from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ClusterMonitoringRequest if the JsonReader was pointing to an instance of it, or null if
* it was pointing to JSON null.
* @throws IOException If an error occurs while reading the ClusterMonitoringRequest.
*/
public static ClusterMonitoringRequest fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
ClusterMonitoringRequest deserializedClusterMonitoringRequest = new ClusterMonitoringRequest();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("workspaceId".equals(fieldName)) {
deserializedClusterMonitoringRequest.workspaceId = reader.getString();
} else if ("primaryKey".equals(fieldName)) {
deserializedClusterMonitoringRequest.primaryKey = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedClusterMonitoringRequest;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy