All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.desktopvirtualization.models.HostPoolPatch Maven / Gradle / Ivy

Go to download

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.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.desktopvirtualization.fluent.models.HostPoolPatchProperties;
import java.io.IOException;
import java.util.Map;

/**
 * HostPool properties that can be patched.
 */
@Fluent
public final class HostPoolPatch extends ProxyResource {
    /*
     * tags to be updated
     */
    private Map tags;

    /*
     * HostPool properties that can be patched.
     */
    private HostPoolPatchProperties innerProperties;

    /*
     * Azure Resource Manager metadata containing createdBy and modifiedBy information.
     */
    private SystemData systemData;

    /*
     * 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 HostPoolPatch class.
     */
    public HostPoolPatch() {
    }

    /**
     * Get the tags property: tags to be updated.
     * 
     * @return the tags value.
     */
    public Map tags() {
        return this.tags;
    }

    /**
     * Set the tags property: tags to be updated.
     * 
     * @param tags the tags value to set.
     * @return the HostPoolPatch object itself.
     */
    public HostPoolPatch withTags(Map tags) {
        this.tags = tags;
        return this;
    }

    /**
     * Get the innerProperties property: HostPool properties that can be patched.
     * 
     * @return the innerProperties value.
     */
    private HostPoolPatchProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     * 
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /**
     * 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;
    }

    /**
     * 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 HostPoolPatch object itself.
     */
    public HostPoolPatch withFriendlyName(String friendlyName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        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 HostPoolPatch object itself.
     */
    public HostPoolPatch withDescription(String description) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        this.innerProperties().withDescription(description);
        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 HostPoolPatch object itself.
     */
    public HostPoolPatch withCustomRdpProperty(String customRdpProperty) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        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 HostPoolPatch object itself.
     */
    public HostPoolPatch withMaxSessionLimit(Integer maxSessionLimit) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        this.innerProperties().withMaxSessionLimit(maxSessionLimit);
        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 HostPoolPatch object itself.
     */
    public HostPoolPatch
        withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType personalDesktopAssignmentType) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        this.innerProperties().withPersonalDesktopAssignmentType(personalDesktopAssignmentType);
        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 HostPoolPatch object itself.
     */
    public HostPoolPatch withLoadBalancerType(LoadBalancerType loadBalancerType) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        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 HostPoolPatch object itself.
     */
    public HostPoolPatch withRing(Integer ring) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        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 HostPoolPatch object itself.
     */
    public HostPoolPatch withValidationEnvironment(Boolean validationEnvironment) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        this.innerProperties().withValidationEnvironment(validationEnvironment);
        return this;
    }

    /**
     * Get the registrationInfo property: The registration info of HostPool.
     * 
     * @return the registrationInfo value.
     */
    public RegistrationInfoPatch 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 HostPoolPatch object itself.
     */
    public HostPoolPatch withRegistrationInfo(RegistrationInfoPatch registrationInfo) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        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 HostPoolPatch object itself.
     */
    public HostPoolPatch withVmTemplate(String vmTemplate) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        this.innerProperties().withVmTemplate(vmTemplate);
        return this;
    }

    /**
     * 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 HostPoolPatch object itself.
     */
    public HostPoolPatch withSsoadfsAuthority(String ssoadfsAuthority) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        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 HostPoolPatch object itself.
     */
    public HostPoolPatch withSsoClientId(String ssoClientId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        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 HostPoolPatch object itself.
     */
    public HostPoolPatch withSsoClientSecretKeyVaultPath(String ssoClientSecretKeyVaultPath) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        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 HostPoolPatch object itself.
     */
    public HostPoolPatch withSsoSecretType(SsoSecretType ssoSecretType) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        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 HostPoolPatch object itself.
     */
    public HostPoolPatch withPreferredAppGroupType(PreferredAppGroupType preferredAppGroupType) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        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 HostPoolPatch object itself.
     */
    public HostPoolPatch withStartVMOnConnect(Boolean startVMOnConnect) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        this.innerProperties().withStartVMOnConnect(startVMOnConnect);
        return this;
    }

    /**
     * Get the publicNetworkAccess property: Enabled to allow this resource to be access from the public network.
     * 
     * @return the publicNetworkAccess value.
     */
    public HostpoolPublicNetworkAccess publicNetworkAccess() {
        return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess();
    }

    /**
     * Set the publicNetworkAccess property: Enabled to allow this resource to be access from the public network.
     * 
     * @param publicNetworkAccess the publicNetworkAccess value to set.
     * @return the HostPoolPatch object itself.
     */
    public HostPoolPatch withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        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 AgentUpdatePatchProperties 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 HostPoolPatch object itself.
     */
    public HostPoolPatch withAgentUpdate(AgentUpdatePatchProperties agentUpdate) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HostPoolPatchProperties();
        }
        this.innerProperties().withAgentUpdate(agentUpdate);
        return this;
    }

    /**
     * Validates the instance.
     * 
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (innerProperties() != null) {
            innerProperties().validate();
        }
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
        jsonWriter.writeStartObject();
        jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element));
        jsonWriter.writeJsonField("properties", this.innerProperties);
        return jsonWriter.writeEndObject();
    }

    /**
     * Reads an instance of HostPoolPatch from the JsonReader.
     * 
     * @param jsonReader The JsonReader being read.
     * @return An instance of HostPoolPatch 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 HostPoolPatch.
     */
    public static HostPoolPatch fromJson(JsonReader jsonReader) throws IOException {
        return jsonReader.readObject(reader -> {
            HostPoolPatch deserializedHostPoolPatch = new HostPoolPatch();
            while (reader.nextToken() != JsonToken.END_OBJECT) {
                String fieldName = reader.getFieldName();
                reader.nextToken();

                if ("id".equals(fieldName)) {
                    deserializedHostPoolPatch.id = reader.getString();
                } else if ("name".equals(fieldName)) {
                    deserializedHostPoolPatch.name = reader.getString();
                } else if ("type".equals(fieldName)) {
                    deserializedHostPoolPatch.type = reader.getString();
                } else if ("tags".equals(fieldName)) {
                    Map tags = reader.readMap(reader1 -> reader1.getString());
                    deserializedHostPoolPatch.tags = tags;
                } else if ("properties".equals(fieldName)) {
                    deserializedHostPoolPatch.innerProperties = HostPoolPatchProperties.fromJson(reader);
                } else if ("systemData".equals(fieldName)) {
                    deserializedHostPoolPatch.systemData = SystemData.fromJson(reader);
                } else {
                    reader.skipChildren();
                }
            }

            return deserializedHostPoolPatch;
        });
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy