![JAR search and dependency download from the Maven repository](/logo.png)
com.azure.resourcemanager.desktopvirtualization.fluent.models.HostPoolInner 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.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.desktopvirtualization.models.AgentUpdateProperties;
import com.azure.resourcemanager.desktopvirtualization.models.HostpoolPublicNetworkAccess;
import com.azure.resourcemanager.desktopvirtualization.models.HostPoolType;
import com.azure.resourcemanager.desktopvirtualization.models.LoadBalancerType;
import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType;
import com.azure.resourcemanager.desktopvirtualization.models.PreferredAppGroupType;
import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection;
import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySet;
import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity;
import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan;
import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetSku;
import com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType;
import java.io.IOException;
import java.util.List;
import java.util.Map;
/**
* Represents a HostPool definition.
*/
@Fluent
public final class HostPoolInner extends ResourceModelWithAllowedPropertySet {
/*
* Detailed properties for HostPool
*/
private HostPoolPropertiesInner innerProperties = new HostPoolPropertiesInner();
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
private SystemData systemData;
/*
* The etag field is *not* required. If it is provided in the response body, it must also be provided as a header
* per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested
* resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section
* 14.26), and If-Range (section 14.27) header fields.
*/
private String etag;
/*
* The type of the resource.
*/
private String type;
/*
* The name of the resource.
*/
private String name;
/*
* Fully qualified resource Id for the resource.
*/
private String id;
/**
* Creates an instance of HostPoolInner class.
*/
public HostPoolInner() {
}
/**
* Get the innerProperties property: Detailed properties for HostPool.
*
* @return the innerProperties value.
*/
private HostPoolPropertiesInner innerProperties() {
return this.innerProperties;
}
/**
* Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
@Override
public SystemData systemData() {
return this.systemData;
}
/**
* Get the etag property: The etag field is *not* required. If it is provided in the response body, it must also be
* provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from
* the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24),
* If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
*
* @return the etag value.
*/
@Override
public String etag() {
return this.etag;
}
/**
* Get the type property: The type of the resource.
*
* @return the type value.
*/
@Override
public String type() {
return this.type;
}
/**
* Get the name property: The name of the resource.
*
* @return the name value.
*/
@Override
public String name() {
return this.name;
}
/**
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the id value.
*/
@Override
public String id() {
return this.id;
}
/**
* {@inheritDoc}
*/
@Override
public HostPoolInner withManagedBy(String managedBy) {
super.withManagedBy(managedBy);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public HostPoolInner withKind(String kind) {
super.withKind(kind);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public HostPoolInner withIdentity(ResourceModelWithAllowedPropertySetIdentity identity) {
super.withIdentity(identity);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public HostPoolInner withSku(ResourceModelWithAllowedPropertySetSku sku) {
super.withSku(sku);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public HostPoolInner withPlan(ResourceModelWithAllowedPropertySetPlan plan) {
super.withPlan(plan);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public HostPoolInner withLocation(String location) {
super.withLocation(location);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public HostPoolInner withTags(Map tags) {
super.withTags(tags);
return this;
}
/**
* Get the objectId property: ObjectId of HostPool. (internal use).
*
* @return the objectId value.
*/
public String objectId() {
return this.innerProperties() == null ? null : this.innerProperties().objectId();
}
/**
* Get the friendlyName property: Friendly name of HostPool.
*
* @return the friendlyName value.
*/
public String friendlyName() {
return this.innerProperties() == null ? null : this.innerProperties().friendlyName();
}
/**
* Set the friendlyName property: Friendly name of HostPool.
*
* @param friendlyName the friendlyName value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withFriendlyName(String friendlyName) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withFriendlyName(friendlyName);
return this;
}
/**
* Get the description property: Description of HostPool.
*
* @return the description value.
*/
public String description() {
return this.innerProperties() == null ? null : this.innerProperties().description();
}
/**
* Set the description property: Description of HostPool.
*
* @param description the description value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withDescription(String description) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withDescription(description);
return this;
}
/**
* Get the hostPoolType property: HostPool type for desktop.
*
* @return the hostPoolType value.
*/
public HostPoolType hostPoolType() {
return this.innerProperties() == null ? null : this.innerProperties().hostPoolType();
}
/**
* Set the hostPoolType property: HostPool type for desktop.
*
* @param hostPoolType the hostPoolType value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withHostPoolType(HostPoolType hostPoolType) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withHostPoolType(hostPoolType);
return this;
}
/**
* Get the personalDesktopAssignmentType property: PersonalDesktopAssignment type for HostPool.
*
* @return the personalDesktopAssignmentType value.
*/
public PersonalDesktopAssignmentType personalDesktopAssignmentType() {
return this.innerProperties() == null ? null : this.innerProperties().personalDesktopAssignmentType();
}
/**
* Set the personalDesktopAssignmentType property: PersonalDesktopAssignment type for HostPool.
*
* @param personalDesktopAssignmentType the personalDesktopAssignmentType value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner
withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType personalDesktopAssignmentType) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withPersonalDesktopAssignmentType(personalDesktopAssignmentType);
return this;
}
/**
* Get the customRdpProperty property: Custom rdp property of HostPool.
*
* @return the customRdpProperty value.
*/
public String customRdpProperty() {
return this.innerProperties() == null ? null : this.innerProperties().customRdpProperty();
}
/**
* Set the customRdpProperty property: Custom rdp property of HostPool.
*
* @param customRdpProperty the customRdpProperty value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withCustomRdpProperty(String customRdpProperty) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withCustomRdpProperty(customRdpProperty);
return this;
}
/**
* Get the maxSessionLimit property: The max session limit of HostPool.
*
* @return the maxSessionLimit value.
*/
public Integer maxSessionLimit() {
return this.innerProperties() == null ? null : this.innerProperties().maxSessionLimit();
}
/**
* Set the maxSessionLimit property: The max session limit of HostPool.
*
* @param maxSessionLimit the maxSessionLimit value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withMaxSessionLimit(Integer maxSessionLimit) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withMaxSessionLimit(maxSessionLimit);
return this;
}
/**
* Get the loadBalancerType property: The type of the load balancer.
*
* @return the loadBalancerType value.
*/
public LoadBalancerType loadBalancerType() {
return this.innerProperties() == null ? null : this.innerProperties().loadBalancerType();
}
/**
* Set the loadBalancerType property: The type of the load balancer.
*
* @param loadBalancerType the loadBalancerType value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withLoadBalancerType(LoadBalancerType loadBalancerType) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withLoadBalancerType(loadBalancerType);
return this;
}
/**
* Get the ring property: The ring number of HostPool.
*
* @return the ring value.
*/
public Integer ring() {
return this.innerProperties() == null ? null : this.innerProperties().ring();
}
/**
* Set the ring property: The ring number of HostPool.
*
* @param ring the ring value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withRing(Integer ring) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withRing(ring);
return this;
}
/**
* Get the validationEnvironment property: Is validation environment.
*
* @return the validationEnvironment value.
*/
public Boolean validationEnvironment() {
return this.innerProperties() == null ? null : this.innerProperties().validationEnvironment();
}
/**
* Set the validationEnvironment property: Is validation environment.
*
* @param validationEnvironment the validationEnvironment value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withValidationEnvironment(Boolean validationEnvironment) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withValidationEnvironment(validationEnvironment);
return this;
}
/**
* Get the registrationInfo property: The registration info of HostPool.
*
* @return the registrationInfo value.
*/
public RegistrationInfoInner registrationInfo() {
return this.innerProperties() == null ? null : this.innerProperties().registrationInfo();
}
/**
* Set the registrationInfo property: The registration info of HostPool.
*
* @param registrationInfo the registrationInfo value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withRegistrationInfo(RegistrationInfoInner registrationInfo) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withRegistrationInfo(registrationInfo);
return this;
}
/**
* Get the vmTemplate property: VM template for sessionhosts configuration within hostpool.
*
* @return the vmTemplate value.
*/
public String vmTemplate() {
return this.innerProperties() == null ? null : this.innerProperties().vmTemplate();
}
/**
* Set the vmTemplate property: VM template for sessionhosts configuration within hostpool.
*
* @param vmTemplate the vmTemplate value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withVmTemplate(String vmTemplate) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withVmTemplate(vmTemplate);
return this;
}
/**
* Get the applicationGroupReferences property: List of applicationGroup links.
*
* @return the applicationGroupReferences value.
*/
public List applicationGroupReferences() {
return this.innerProperties() == null ? null : this.innerProperties().applicationGroupReferences();
}
/**
* Get the appAttachPackageReferences property: List of App Attach Package links.
*
* @return the appAttachPackageReferences value.
*/
public List appAttachPackageReferences() {
return this.innerProperties() == null ? null : this.innerProperties().appAttachPackageReferences();
}
/**
* Get the ssoadfsAuthority property: URL to customer ADFS server for signing WVD SSO certificates.
*
* @return the ssoadfsAuthority value.
*/
public String ssoadfsAuthority() {
return this.innerProperties() == null ? null : this.innerProperties().ssoadfsAuthority();
}
/**
* Set the ssoadfsAuthority property: URL to customer ADFS server for signing WVD SSO certificates.
*
* @param ssoadfsAuthority the ssoadfsAuthority value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withSsoadfsAuthority(String ssoadfsAuthority) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withSsoadfsAuthority(ssoadfsAuthority);
return this;
}
/**
* Get the ssoClientId property: ClientId for the registered Relying Party used to issue WVD SSO certificates.
*
* @return the ssoClientId value.
*/
public String ssoClientId() {
return this.innerProperties() == null ? null : this.innerProperties().ssoClientId();
}
/**
* Set the ssoClientId property: ClientId for the registered Relying Party used to issue WVD SSO certificates.
*
* @param ssoClientId the ssoClientId value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withSsoClientId(String ssoClientId) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withSsoClientId(ssoClientId);
return this;
}
/**
* Get the ssoClientSecretKeyVaultPath property: Path to Azure KeyVault storing the secret used for communication to
* ADFS.
*
* @return the ssoClientSecretKeyVaultPath value.
*/
public String ssoClientSecretKeyVaultPath() {
return this.innerProperties() == null ? null : this.innerProperties().ssoClientSecretKeyVaultPath();
}
/**
* Set the ssoClientSecretKeyVaultPath property: Path to Azure KeyVault storing the secret used for communication to
* ADFS.
*
* @param ssoClientSecretKeyVaultPath the ssoClientSecretKeyVaultPath value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withSsoClientSecretKeyVaultPath(String ssoClientSecretKeyVaultPath) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withSsoClientSecretKeyVaultPath(ssoClientSecretKeyVaultPath);
return this;
}
/**
* Get the ssoSecretType property: The type of single sign on Secret Type.
*
* @return the ssoSecretType value.
*/
public SsoSecretType ssoSecretType() {
return this.innerProperties() == null ? null : this.innerProperties().ssoSecretType();
}
/**
* Set the ssoSecretType property: The type of single sign on Secret Type.
*
* @param ssoSecretType the ssoSecretType value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withSsoSecretType(SsoSecretType ssoSecretType) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withSsoSecretType(ssoSecretType);
return this;
}
/**
* Get the preferredAppGroupType property: The type of preferred application group type, default to Desktop
* Application Group.
*
* @return the preferredAppGroupType value.
*/
public PreferredAppGroupType preferredAppGroupType() {
return this.innerProperties() == null ? null : this.innerProperties().preferredAppGroupType();
}
/**
* Set the preferredAppGroupType property: The type of preferred application group type, default to Desktop
* Application Group.
*
* @param preferredAppGroupType the preferredAppGroupType value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withPreferredAppGroupType(PreferredAppGroupType preferredAppGroupType) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withPreferredAppGroupType(preferredAppGroupType);
return this;
}
/**
* Get the startVMOnConnect property: The flag to turn on/off StartVMOnConnect feature.
*
* @return the startVMOnConnect value.
*/
public Boolean startVMOnConnect() {
return this.innerProperties() == null ? null : this.innerProperties().startVMOnConnect();
}
/**
* Set the startVMOnConnect property: The flag to turn on/off StartVMOnConnect feature.
*
* @param startVMOnConnect the startVMOnConnect value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withStartVMOnConnect(Boolean startVMOnConnect) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withStartVMOnConnect(startVMOnConnect);
return this;
}
/**
* Get the cloudPcResource property: Is cloud pc resource.
*
* @return the cloudPcResource value.
*/
public Boolean cloudPcResource() {
return this.innerProperties() == null ? null : this.innerProperties().cloudPcResource();
}
/**
* Get the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private
* networks, Disabled allows this resource to only be accessed via private endpoints.
*
* @return the publicNetworkAccess value.
*/
public HostpoolPublicNetworkAccess publicNetworkAccess() {
return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess();
}
/**
* Set the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private
* networks, Disabled allows this resource to only be accessed via private endpoints.
*
* @param publicNetworkAccess the publicNetworkAccess value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withPublicNetworkAccess(publicNetworkAccess);
return this;
}
/**
* Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack
* component.
*
* @return the agentUpdate value.
*/
public AgentUpdateProperties agentUpdate() {
return this.innerProperties() == null ? null : this.innerProperties().agentUpdate();
}
/**
* Set the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack
* component.
*
* @param agentUpdate the agentUpdate value to set.
* @return the HostPoolInner object itself.
*/
public HostPoolInner withAgentUpdate(AgentUpdateProperties agentUpdate) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withAgentUpdate(agentUpdate);
return this;
}
/**
* Get the privateEndpointConnections property: List of private endpoint connection associated with the specified
* resource.
*
* @return the privateEndpointConnections value.
*/
public List privateEndpointConnections() {
return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections();
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
if (innerProperties() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException("Missing required property innerProperties in model HostPoolInner"));
} else {
innerProperties().validate();
}
if (identity() != null) {
identity().validate();
}
if (sku() != null) {
sku().validate();
}
if (plan() != null) {
plan().validate();
}
}
private static final ClientLogger LOGGER = new ClientLogger(HostPoolInner.class);
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("location", location());
jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
jsonWriter.writeStringField("managedBy", managedBy());
jsonWriter.writeStringField("kind", kind());
jsonWriter.writeJsonField("identity", identity());
jsonWriter.writeJsonField("sku", sku());
jsonWriter.writeJsonField("plan", plan());
jsonWriter.writeJsonField("properties", this.innerProperties);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of HostPoolInner from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of HostPoolInner 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 HostPoolInner.
*/
public static HostPoolInner fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
HostPoolInner deserializedHostPoolInner = new HostPoolInner();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("id".equals(fieldName)) {
deserializedHostPoolInner.id = reader.getString();
} else if ("name".equals(fieldName)) {
deserializedHostPoolInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedHostPoolInner.type = reader.getString();
} else if ("location".equals(fieldName)) {
deserializedHostPoolInner.withLocation(reader.getString());
} else if ("tags".equals(fieldName)) {
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedHostPoolInner.withTags(tags);
} else if ("managedBy".equals(fieldName)) {
deserializedHostPoolInner.withManagedBy(reader.getString());
} else if ("kind".equals(fieldName)) {
deserializedHostPoolInner.withKind(reader.getString());
} else if ("etag".equals(fieldName)) {
deserializedHostPoolInner.etag = reader.getString();
} else if ("identity".equals(fieldName)) {
deserializedHostPoolInner
.withIdentity(ResourceModelWithAllowedPropertySetIdentity.fromJson(reader));
} else if ("sku".equals(fieldName)) {
deserializedHostPoolInner.withSku(ResourceModelWithAllowedPropertySetSku.fromJson(reader));
} else if ("plan".equals(fieldName)) {
deserializedHostPoolInner.withPlan(ResourceModelWithAllowedPropertySetPlan.fromJson(reader));
} else if ("systemData".equals(fieldName)) {
deserializedHostPoolInner.systemData = SystemData.fromJson(reader);
} else if ("properties".equals(fieldName)) {
deserializedHostPoolInner.innerProperties = HostPoolPropertiesInner.fromJson(reader);
} else {
reader.skipChildren();
}
}
return deserializedHostPoolInner;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy