// 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.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties;
import com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties;
import com.azure.resourcemanager.azurestackhci.models.ProvisioningState;
import com.azure.resourcemanager.azurestackhci.models.Status;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.Map;

/** Cluster details. */
@Fluent
public final class ClusterInner extends Resource {
    /*
     * System data of Cluster resource
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

    /*
     * Cluster properties.
     */
    @JsonProperty(value = "properties")
    private ClusterProperties innerProperties;

    /**
     * Get the systemData property: System data of Cluster resource.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /**
     * Get the innerProperties property: Cluster properties.
     *
     * @return the innerProperties value.
     */
    private ClusterProperties innerProperties() {
        return this.innerProperties;
    }

    /** {@inheritDoc} */
    @Override
    public ClusterInner withLocation(String location) {
        super.withLocation(location);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ClusterInner withTags(Map<String, String> tags) {
        super.withTags(tags);
        return this;
    }

    /**
     * Get the provisioningState property: Provisioning state.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the status property: Status of the cluster agent.
     *
     * @return the status value.
     */
    public Status status() {
        return this.innerProperties() == null ? null : this.innerProperties().status();
    }

    /**
     * Get the cloudId property: Unique, immutable resource id.
     *
     * @return the cloudId value.
     */
    public String cloudId() {
        return this.innerProperties() == null ? null : this.innerProperties().cloudId();
    }

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

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

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

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

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

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

    /**
     * Get the aadApplicationObjectId property: Object id of cluster AAD identity.
     *
     * @return the aadApplicationObjectId value.
     */
    public String aadApplicationObjectId() {
        return this.innerProperties() == null ? null : this.innerProperties().aadApplicationObjectId();
    }

    /**
     * Set the aadApplicationObjectId property: Object id of cluster AAD identity.
     *
     * @param aadApplicationObjectId the aadApplicationObjectId value to set.
     * @return the ClusterInner object itself.
     */
    public ClusterInner withAadApplicationObjectId(String aadApplicationObjectId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ClusterProperties();
        }
        this.innerProperties().withAadApplicationObjectId(aadApplicationObjectId);
        return this;
    }

    /**
     * Get the aadServicePrincipalObjectId property: Id of cluster identity service principal.
     *
     * @return the aadServicePrincipalObjectId value.
     */
    public String aadServicePrincipalObjectId() {
        return this.innerProperties() == null ? null : this.innerProperties().aadServicePrincipalObjectId();
    }

    /**
     * Set the aadServicePrincipalObjectId property: Id of cluster identity service principal.
     *
     * @param aadServicePrincipalObjectId the aadServicePrincipalObjectId value to set.
     * @return the ClusterInner object itself.
     */
    public ClusterInner withAadServicePrincipalObjectId(String aadServicePrincipalObjectId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ClusterProperties();
        }
        this.innerProperties().withAadServicePrincipalObjectId(aadServicePrincipalObjectId);
        return this;
    }

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

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

    /**
     * Get the reportedProperties property: Properties reported by cluster agent.
     *
     * @return the reportedProperties value.
     */
    public ClusterReportedProperties reportedProperties() {
        return this.innerProperties() == null ? null : this.innerProperties().reportedProperties();
    }

    /**
     * Get the trialDaysRemaining property: Number of days remaining in the trial period.
     *
     * @return the trialDaysRemaining value.
     */
    public Float trialDaysRemaining() {
        return this.innerProperties() == null ? null : this.innerProperties().trialDaysRemaining();
    }

    /**
     * Get the billingModel property: Type of billing applied to the resource.
     *
     * @return the billingModel value.
     */
    public String billingModel() {
        return this.innerProperties() == null ? null : this.innerProperties().billingModel();
    }

    /**
     * Get the registrationTimestamp property: First cluster sync timestamp.
     *
     * @return the registrationTimestamp value.
     */
    public OffsetDateTime registrationTimestamp() {
        return this.innerProperties() == null ? null : this.innerProperties().registrationTimestamp();
    }

    /**
     * Get the lastSyncTimestamp property: Most recent cluster sync timestamp.
     *
     * @return the lastSyncTimestamp value.
     */
    public OffsetDateTime lastSyncTimestamp() {
        return this.innerProperties() == null ? null : this.innerProperties().lastSyncTimestamp();
    }

    /**
     * Get the lastBillingTimestamp property: Most recent billing meter timestamp.
     *
     * @return the lastBillingTimestamp value.
     */
    public OffsetDateTime lastBillingTimestamp() {
        return this.innerProperties() == null ? null : this.innerProperties().lastBillingTimestamp();
    }

    /**
     * Get the serviceEndpoint property: Region specific DataPath Endpoint of the cluster.
     *
     * @return the serviceEndpoint value.
     */
    public String serviceEndpoint() {
        return this.innerProperties() == null ? null : this.innerProperties().serviceEndpoint();
    }

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