com.azure.resourcemanager.newrelicobservability.fluent.models.VMExtensionPayloadInner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-newrelicobservability Show documentation
Show all versions of azure-resourcemanager-newrelicobservability Show documentation
This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-01-01.
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.newrelicobservability.fluent.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;
/**
* Response of payload to be passed while installing VM agent.
*/
@Fluent
public final class VMExtensionPayloadInner implements JsonSerializable {
/*
* Ingestion key of the account
*/
private String ingestionKey;
/**
* Creates an instance of VMExtensionPayloadInner class.
*/
public VMExtensionPayloadInner() {
}
/**
* Get the ingestionKey property: Ingestion key of the account.
*
* @return the ingestionKey value.
*/
public String ingestionKey() {
return this.ingestionKey;
}
/**
* Set the ingestionKey property: Ingestion key of the account.
*
* @param ingestionKey the ingestionKey value to set.
* @return the VMExtensionPayloadInner object itself.
*/
public VMExtensionPayloadInner withIngestionKey(String ingestionKey) {
this.ingestionKey = ingestionKey;
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("ingestionKey", this.ingestionKey);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of VMExtensionPayloadInner from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of VMExtensionPayloadInner 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 VMExtensionPayloadInner.
*/
public static VMExtensionPayloadInner fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
VMExtensionPayloadInner deserializedVMExtensionPayloadInner = new VMExtensionPayloadInner();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("ingestionKey".equals(fieldName)) {
deserializedVMExtensionPayloadInner.ingestionKey = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedVMExtensionPayloadInner;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy