com.azure.resourcemanager.hybridcompute.models.LicenseProfileStorageModelEsuProperties 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.models;
import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
import java.util.List;
/**
* License profile storage model for ESU properties.
*/
@Immutable
public class LicenseProfileStorageModelEsuProperties
implements JsonSerializable {
/*
* The guid id of the license.
*/
private String assignedLicenseImmutableId;
/*
* The list of ESU keys.
*/
private List esuKeys;
/**
* Creates an instance of LicenseProfileStorageModelEsuProperties class.
*/
public LicenseProfileStorageModelEsuProperties() {
}
/**
* Get the assignedLicenseImmutableId property: The guid id of the license.
*
* @return the assignedLicenseImmutableId value.
*/
public String assignedLicenseImmutableId() {
return this.assignedLicenseImmutableId;
}
/**
* Set the assignedLicenseImmutableId property: The guid id of the license.
*
* @param assignedLicenseImmutableId the assignedLicenseImmutableId value to set.
* @return the LicenseProfileStorageModelEsuProperties object itself.
*/
LicenseProfileStorageModelEsuProperties withAssignedLicenseImmutableId(String assignedLicenseImmutableId) {
this.assignedLicenseImmutableId = assignedLicenseImmutableId;
return this;
}
/**
* Get the esuKeys property: The list of ESU keys.
*
* @return the esuKeys value.
*/
public List esuKeys() {
return this.esuKeys;
}
/**
* Set the esuKeys property: The list of ESU keys.
*
* @param esuKeys the esuKeys value to set.
* @return the LicenseProfileStorageModelEsuProperties object itself.
*/
LicenseProfileStorageModelEsuProperties withEsuKeys(List esuKeys) {
this.esuKeys = esuKeys;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (esuKeys() != null) {
esuKeys().forEach(e -> e.validate());
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of LicenseProfileStorageModelEsuProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of LicenseProfileStorageModelEsuProperties 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 LicenseProfileStorageModelEsuProperties.
*/
public static LicenseProfileStorageModelEsuProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
LicenseProfileStorageModelEsuProperties deserializedLicenseProfileStorageModelEsuProperties
= new LicenseProfileStorageModelEsuProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("assignedLicenseImmutableId".equals(fieldName)) {
deserializedLicenseProfileStorageModelEsuProperties.assignedLicenseImmutableId = reader.getString();
} else if ("esuKeys".equals(fieldName)) {
List esuKeys = reader.readArray(reader1 -> EsuKey.fromJson(reader1));
deserializedLicenseProfileStorageModelEsuProperties.esuKeys = esuKeys;
} else {
reader.skipChildren();
}
}
return deserializedLicenseProfileStorageModelEsuProperties;
});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy