![JAR search and dependency download from the Maven repository](/logo.png)
com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationGroupProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-desktopvirtualization Show documentation
Show all versions of azure-resourcemanager-desktopvirtualization Show documentation
This package contains Microsoft Azure SDK for DesktopVirtualization Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-04.
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.desktopvirtualization.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupType;
import java.io.IOException;
/**
* Schema for ApplicationGroup properties.
*/
@Fluent
public final class ApplicationGroupProperties implements JsonSerializable {
/*
* ObjectId of ApplicationGroup. (internal use)
*/
private String objectId;
/*
* Description of ApplicationGroup.
*/
private String description;
/*
* Friendly name of ApplicationGroup.
*/
private String friendlyName;
/*
* HostPool arm path of ApplicationGroup.
*/
private String hostPoolArmPath;
/*
* Workspace arm path of ApplicationGroup.
*/
private String workspaceArmPath;
/*
* Resource Type of ApplicationGroup.
*/
private ApplicationGroupType applicationGroupType;
/*
* Is cloud pc resource.
*/
private Boolean cloudPcResource;
/*
* Boolean representing whether the applicationGroup is show in the feed.
*/
private Boolean showInFeed;
/**
* Creates an instance of ApplicationGroupProperties class.
*/
public ApplicationGroupProperties() {
}
/**
* Get the objectId property: ObjectId of ApplicationGroup. (internal use).
*
* @return the objectId value.
*/
public String objectId() {
return this.objectId;
}
/**
* Get the description property: Description of ApplicationGroup.
*
* @return the description value.
*/
public String description() {
return this.description;
}
/**
* Set the description property: Description of ApplicationGroup.
*
* @param description the description value to set.
* @return the ApplicationGroupProperties object itself.
*/
public ApplicationGroupProperties withDescription(String description) {
this.description = description;
return this;
}
/**
* Get the friendlyName property: Friendly name of ApplicationGroup.
*
* @return the friendlyName value.
*/
public String friendlyName() {
return this.friendlyName;
}
/**
* Set the friendlyName property: Friendly name of ApplicationGroup.
*
* @param friendlyName the friendlyName value to set.
* @return the ApplicationGroupProperties object itself.
*/
public ApplicationGroupProperties withFriendlyName(String friendlyName) {
this.friendlyName = friendlyName;
return this;
}
/**
* Get the hostPoolArmPath property: HostPool arm path of ApplicationGroup.
*
* @return the hostPoolArmPath value.
*/
public String hostPoolArmPath() {
return this.hostPoolArmPath;
}
/**
* Set the hostPoolArmPath property: HostPool arm path of ApplicationGroup.
*
* @param hostPoolArmPath the hostPoolArmPath value to set.
* @return the ApplicationGroupProperties object itself.
*/
public ApplicationGroupProperties withHostPoolArmPath(String hostPoolArmPath) {
this.hostPoolArmPath = hostPoolArmPath;
return this;
}
/**
* Get the workspaceArmPath property: Workspace arm path of ApplicationGroup.
*
* @return the workspaceArmPath value.
*/
public String workspaceArmPath() {
return this.workspaceArmPath;
}
/**
* Get the applicationGroupType property: Resource Type of ApplicationGroup.
*
* @return the applicationGroupType value.
*/
public ApplicationGroupType applicationGroupType() {
return this.applicationGroupType;
}
/**
* Set the applicationGroupType property: Resource Type of ApplicationGroup.
*
* @param applicationGroupType the applicationGroupType value to set.
* @return the ApplicationGroupProperties object itself.
*/
public ApplicationGroupProperties withApplicationGroupType(ApplicationGroupType applicationGroupType) {
this.applicationGroupType = applicationGroupType;
return this;
}
/**
* Get the cloudPcResource property: Is cloud pc resource.
*
* @return the cloudPcResource value.
*/
public Boolean cloudPcResource() {
return this.cloudPcResource;
}
/**
* Get the showInFeed property: Boolean representing whether the applicationGroup is show in the feed.
*
* @return the showInFeed value.
*/
public Boolean showInFeed() {
return this.showInFeed;
}
/**
* Set the showInFeed property: Boolean representing whether the applicationGroup is show in the feed.
*
* @param showInFeed the showInFeed value to set.
* @return the ApplicationGroupProperties object itself.
*/
public ApplicationGroupProperties withShowInFeed(Boolean showInFeed) {
this.showInFeed = showInFeed;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (hostPoolArmPath() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property hostPoolArmPath in model ApplicationGroupProperties"));
}
if (applicationGroupType() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property applicationGroupType in model ApplicationGroupProperties"));
}
}
private static final ClientLogger LOGGER = new ClientLogger(ApplicationGroupProperties.class);
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("hostPoolArmPath", this.hostPoolArmPath);
jsonWriter.writeStringField("applicationGroupType",
this.applicationGroupType == null ? null : this.applicationGroupType.toString());
jsonWriter.writeStringField("description", this.description);
jsonWriter.writeStringField("friendlyName", this.friendlyName);
jsonWriter.writeBooleanField("showInFeed", this.showInFeed);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of ApplicationGroupProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ApplicationGroupProperties if the JsonReader was pointing to an instance of it, or null if
* it was pointing to JSON null.
* @throws IllegalStateException If the deserialized JSON object was missing any required properties.
* @throws IOException If an error occurs while reading the ApplicationGroupProperties.
*/
public static ApplicationGroupProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
ApplicationGroupProperties deserializedApplicationGroupProperties = new ApplicationGroupProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("hostPoolArmPath".equals(fieldName)) {
deserializedApplicationGroupProperties.hostPoolArmPath = reader.getString();
} else if ("applicationGroupType".equals(fieldName)) {
deserializedApplicationGroupProperties.applicationGroupType
= ApplicationGroupType.fromString(reader.getString());
} else if ("objectId".equals(fieldName)) {
deserializedApplicationGroupProperties.objectId = reader.getString();
} else if ("description".equals(fieldName)) {
deserializedApplicationGroupProperties.description = reader.getString();
} else if ("friendlyName".equals(fieldName)) {
deserializedApplicationGroupProperties.friendlyName = reader.getString();
} else if ("workspaceArmPath".equals(fieldName)) {
deserializedApplicationGroupProperties.workspaceArmPath = reader.getString();
} else if ("cloudPcResource".equals(fieldName)) {
deserializedApplicationGroupProperties.cloudPcResource = reader.getNullable(JsonReader::getBoolean);
} else if ("showInFeed".equals(fieldName)) {
deserializedApplicationGroupProperties.showInFeed = reader.getNullable(JsonReader::getBoolean);
} else {
reader.skipChildren();
}
}
return deserializedApplicationGroupProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy