com.azure.resourcemanager.hybridcompute.fluent.models.EsuProfileUpdateProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-hybridcompute Show documentation
Show all versions of azure-resourcemanager-hybridcompute Show documentation
This package contains Microsoft Azure SDK for HybridCompute Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Hybrid Compute Management Client. Package tag package-preview-2024-07.
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.hybridcompute.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;
/**
* Describes the Update properties of a ESU License Profile.
*/
@Fluent
public final class EsuProfileUpdateProperties implements JsonSerializable {
/*
* The resource id of the license.
*/
private String assignedLicense;
/**
* Creates an instance of EsuProfileUpdateProperties class.
*/
public EsuProfileUpdateProperties() {
}
/**
* Get the assignedLicense property: The resource id of the license.
*
* @return the assignedLicense value.
*/
public String assignedLicense() {
return this.assignedLicense;
}
/**
* Set the assignedLicense property: The resource id of the license.
*
* @param assignedLicense the assignedLicense value to set.
* @return the EsuProfileUpdateProperties object itself.
*/
public EsuProfileUpdateProperties withAssignedLicense(String assignedLicense) {
this.assignedLicense = assignedLicense;
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("assignedLicense", this.assignedLicense);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of EsuProfileUpdateProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of EsuProfileUpdateProperties 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 EsuProfileUpdateProperties.
*/
public static EsuProfileUpdateProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
EsuProfileUpdateProperties deserializedEsuProfileUpdateProperties = new EsuProfileUpdateProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("assignedLicense".equals(fieldName)) {
deserializedEsuProfileUpdateProperties.assignedLicense = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedEsuProfileUpdateProperties;
});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy