// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.azurestackhci.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Cluster properties. */
@Fluent
public final class ClusterPatchProperties {
    /*
     * Endpoint configured for management from the Azure portal
     */
    @JsonProperty(value = "cloudManagementEndpoint")
    private String cloudManagementEndpoint;

    /*
     * App id of cluster AAD identity.
     */
    @JsonProperty(value = "aadClientId")
    private String aadClientId;

    /*
     * Tenant id of cluster AAD identity.
     */
    @JsonProperty(value = "aadTenantId")
    private String aadTenantId;

    /*
     * Desired properties of the cluster.
     */
    @JsonProperty(value = "desiredProperties")
    private ClusterDesiredProperties desiredProperties;

    /**
     * Get the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal.
     *
     * @return the cloudManagementEndpoint value.
     */
    public String cloudManagementEndpoint() {
        return this.cloudManagementEndpoint;
    }

    /**
     * Set the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal.
     *
     * @param cloudManagementEndpoint the cloudManagementEndpoint value to set.
     * @return the ClusterPatchProperties object itself.
     */
    public ClusterPatchProperties withCloudManagementEndpoint(String cloudManagementEndpoint) {
        this.cloudManagementEndpoint = cloudManagementEndpoint;
        return this;
    }

    /**
     * Get the aadClientId property: App id of cluster AAD identity.
     *
     * @return the aadClientId value.
     */
    public String aadClientId() {
        return this.aadClientId;
    }

    /**
     * Set the aadClientId property: App id of cluster AAD identity.
     *
     * @param aadClientId the aadClientId value to set.
     * @return the ClusterPatchProperties object itself.
     */
    public ClusterPatchProperties withAadClientId(String aadClientId) {
        this.aadClientId = aadClientId;
        return this;
    }

    /**
     * Get the aadTenantId property: Tenant id of cluster AAD identity.
     *
     * @return the aadTenantId value.
     */
    public String aadTenantId() {
        return this.aadTenantId;
    }

    /**
     * Set the aadTenantId property: Tenant id of cluster AAD identity.
     *
     * @param aadTenantId the aadTenantId value to set.
     * @return the ClusterPatchProperties object itself.
     */
    public ClusterPatchProperties withAadTenantId(String aadTenantId) {
        this.aadTenantId = aadTenantId;
        return this;
    }

    /**
     * Get the desiredProperties property: Desired properties of the cluster.
     *
     * @return the desiredProperties value.
     */
    public ClusterDesiredProperties desiredProperties() {
        return this.desiredProperties;
    }

    /**
     * Set the desiredProperties property: Desired properties of the cluster.
     *
     * @param desiredProperties the desiredProperties value to set.
     * @return the ClusterPatchProperties object itself.
     */
    public ClusterPatchProperties withDesiredProperties(ClusterDesiredProperties desiredProperties) {
        this.desiredProperties = desiredProperties;
        return this;
    }

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