com.azure.resourcemanager.hybridcompute.models.LicenseProfileArmEsuPropertiesWithoutAssignedLicense 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.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
import java.util.List;
/**
* Describes the properties of a License Profile ARM model.
*/
@Immutable
public class LicenseProfileArmEsuPropertiesWithoutAssignedLicense extends LicenseProfileStorageModelEsuProperties {
/*
* The type of the Esu servers.
*/
private EsuServerType serverType;
/*
* Indicates the eligibility state of Esu.
*/
private EsuEligibility esuEligibility;
/*
* Indicates whether there is an ESU Key currently active for the machine.
*/
private EsuKeyState esuKeyState;
/*
* The list of ESU keys.
*/
private List esuKeys;
/*
* The guid id of the license.
*/
private String assignedLicenseImmutableId;
/**
* Creates an instance of LicenseProfileArmEsuPropertiesWithoutAssignedLicense class.
*/
public LicenseProfileArmEsuPropertiesWithoutAssignedLicense() {
}
/**
* Get the serverType property: The type of the Esu servers.
*
* @return the serverType value.
*/
public EsuServerType serverType() {
return this.serverType;
}
/**
* Set the serverType property: The type of the Esu servers.
*
* @param serverType the serverType value to set.
* @return the LicenseProfileArmEsuPropertiesWithoutAssignedLicense object itself.
*/
LicenseProfileArmEsuPropertiesWithoutAssignedLicense withServerType(EsuServerType serverType) {
this.serverType = serverType;
return this;
}
/**
* Get the esuEligibility property: Indicates the eligibility state of Esu.
*
* @return the esuEligibility value.
*/
public EsuEligibility esuEligibility() {
return this.esuEligibility;
}
/**
* Set the esuEligibility property: Indicates the eligibility state of Esu.
*
* @param esuEligibility the esuEligibility value to set.
* @return the LicenseProfileArmEsuPropertiesWithoutAssignedLicense object itself.
*/
LicenseProfileArmEsuPropertiesWithoutAssignedLicense withEsuEligibility(EsuEligibility esuEligibility) {
this.esuEligibility = esuEligibility;
return this;
}
/**
* Get the esuKeyState property: Indicates whether there is an ESU Key currently active for the machine.
*
* @return the esuKeyState value.
*/
public EsuKeyState esuKeyState() {
return this.esuKeyState;
}
/**
* Set the esuKeyState property: Indicates whether there is an ESU Key currently active for the machine.
*
* @param esuKeyState the esuKeyState value to set.
* @return the LicenseProfileArmEsuPropertiesWithoutAssignedLicense object itself.
*/
LicenseProfileArmEsuPropertiesWithoutAssignedLicense withEsuKeyState(EsuKeyState esuKeyState) {
this.esuKeyState = esuKeyState;
return this;
}
/**
* Get the esuKeys property: The list of ESU keys.
*
* @return the esuKeys value.
*/
@Override
public List esuKeys() {
return this.esuKeys;
}
/**
* Get the assignedLicenseImmutableId property: The guid id of the license.
*
* @return the assignedLicenseImmutableId value.
*/
@Override
public String assignedLicenseImmutableId() {
return this.assignedLicenseImmutableId;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
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 LicenseProfileArmEsuPropertiesWithoutAssignedLicense from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of LicenseProfileArmEsuPropertiesWithoutAssignedLicense 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 LicenseProfileArmEsuPropertiesWithoutAssignedLicense.
*/
public static LicenseProfileArmEsuPropertiesWithoutAssignedLicense fromJson(JsonReader jsonReader)
throws IOException {
return jsonReader.readObject(reader -> {
LicenseProfileArmEsuPropertiesWithoutAssignedLicense deserializedLicenseProfileArmEsuPropertiesWithoutAssignedLicense
= new LicenseProfileArmEsuPropertiesWithoutAssignedLicense();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("assignedLicenseImmutableId".equals(fieldName)) {
deserializedLicenseProfileArmEsuPropertiesWithoutAssignedLicense.assignedLicenseImmutableId
= reader.getString();
} else if ("esuKeys".equals(fieldName)) {
List esuKeys = reader.readArray(reader1 -> EsuKey.fromJson(reader1));
deserializedLicenseProfileArmEsuPropertiesWithoutAssignedLicense.esuKeys = esuKeys;
} else if ("serverType".equals(fieldName)) {
deserializedLicenseProfileArmEsuPropertiesWithoutAssignedLicense.serverType
= EsuServerType.fromString(reader.getString());
} else if ("esuEligibility".equals(fieldName)) {
deserializedLicenseProfileArmEsuPropertiesWithoutAssignedLicense.esuEligibility
= EsuEligibility.fromString(reader.getString());
} else if ("esuKeyState".equals(fieldName)) {
deserializedLicenseProfileArmEsuPropertiesWithoutAssignedLicense.esuKeyState
= EsuKeyState.fromString(reader.getString());
} else {
reader.skipChildren();
}
}
return deserializedLicenseProfileArmEsuPropertiesWithoutAssignedLicense;
});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy