com.azure.messaging.eventgrid.systemevents.ContainerServiceClusterSupportEventData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-messaging-eventgrid Show documentation
Show all versions of azure-messaging-eventgrid Show documentation
This package contains Microsoft Azure EventGrid SDK.
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.messaging.eventgrid.systemevents;
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;
/**
* Schema of common properties of cluster support events.
*/
@Fluent
public class ContainerServiceClusterSupportEventData
implements JsonSerializable {
/*
* The Kubernetes version of the ManagedCluster resource
*/
private String kubernetesVersion;
/**
* Creates an instance of ContainerServiceClusterSupportEventData class.
*/
public ContainerServiceClusterSupportEventData() {
}
/**
* Get the kubernetesVersion property: The Kubernetes version of the ManagedCluster resource.
*
* @return the kubernetesVersion value.
*/
public String getKubernetesVersion() {
return this.kubernetesVersion;
}
/**
* Set the kubernetesVersion property: The Kubernetes version of the ManagedCluster resource.
*
* @param kubernetesVersion the kubernetesVersion value to set.
* @return the ContainerServiceClusterSupportEventData object itself.
*/
public ContainerServiceClusterSupportEventData setKubernetesVersion(String kubernetesVersion) {
this.kubernetesVersion = kubernetesVersion;
return this;
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of ContainerServiceClusterSupportEventData from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ContainerServiceClusterSupportEventData 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 ContainerServiceClusterSupportEventData.
*/
public static ContainerServiceClusterSupportEventData fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
ContainerServiceClusterSupportEventData deserializedContainerServiceClusterSupportEventData
= new ContainerServiceClusterSupportEventData();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("kubernetesVersion".equals(fieldName)) {
deserializedContainerServiceClusterSupportEventData.kubernetesVersion = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedContainerServiceClusterSupportEventData;
});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy