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

package com.azure.resourcemanager.hybridcontainerservice.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Defines the observed Arc Agent status that is resourceSynced back to the ARM resource. */
@Fluent
public final class ArcAgentStatus {
    /*
     * Observed deployment state of the Arc Agents on the target cluster. Possible values include: 'pending',
     * 'provisioning', 'provisioned', 'deleting', 'failed', 'upgrading'
     */
    @JsonProperty(value = "deploymentState")
    private DeploymentState deploymentState;

    /*
     * Error messages while onboarding/upgrading/uninstalling the Arc agents
     */
    @JsonProperty(value = "errorMessage")
    private String errorMessage;

    /*
     * Onboarding public key for provisioning the Managed identity for the HybridAKS cluster. Will be used to create
     * the hybridIdentityMetadata proxy resource and will not be persisted.
     */
    @JsonProperty(value = "onboardingPublicKey")
    private String onboardingPublicKey;

    /*
     * Version of the Arc agents currently running on the Provisioned cluster resource.
     */
    @JsonProperty(value = "agentVersion")
    private String agentVersion;

    /*
     * Number of CPU cores present in the Provisioned cluster resource
     */
    @JsonProperty(value = "coreCount")
    private Long coreCount;

    /*
     * ManagedIdentity certificate expiration time (ValidUntil).
     */
    @JsonProperty(value = "managedIdentityCertificateExpirationTime")
    private OffsetDateTime managedIdentityCertificateExpirationTime;

    /*
     * Last connected timestamp of the Provisioned cluster resource.
     */
    @JsonProperty(value = "lastConnectivityTime")
    private OffsetDateTime lastConnectivityTime;

    /** Creates an instance of ArcAgentStatus class. */
    public ArcAgentStatus() {
    }

    /**
     * Get the deploymentState property: Observed deployment state of the Arc Agents on the target cluster. Possible
     * values include: 'pending', 'provisioning', 'provisioned', 'deleting', 'failed', 'upgrading'.
     *
     * @return the deploymentState value.
     */
    public DeploymentState deploymentState() {
        return this.deploymentState;
    }

    /**
     * Set the deploymentState property: Observed deployment state of the Arc Agents on the target cluster. Possible
     * values include: 'pending', 'provisioning', 'provisioned', 'deleting', 'failed', 'upgrading'.
     *
     * @param deploymentState the deploymentState value to set.
     * @return the ArcAgentStatus object itself.
     */
    public ArcAgentStatus withDeploymentState(DeploymentState deploymentState) {
        this.deploymentState = deploymentState;
        return this;
    }

    /**
     * Get the errorMessage property: Error messages while onboarding/upgrading/uninstalling the Arc agents.
     *
     * @return the errorMessage value.
     */
    public String errorMessage() {
        return this.errorMessage;
    }

    /**
     * Set the errorMessage property: Error messages while onboarding/upgrading/uninstalling the Arc agents.
     *
     * @param errorMessage the errorMessage value to set.
     * @return the ArcAgentStatus object itself.
     */
    public ArcAgentStatus withErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
        return this;
    }

    /**
     * Get the onboardingPublicKey property: Onboarding public key for provisioning the Managed identity for the
     * HybridAKS cluster. Will be used to create the hybridIdentityMetadata proxy resource and will not be persisted.
     *
     * @return the onboardingPublicKey value.
     */
    public String onboardingPublicKey() {
        return this.onboardingPublicKey;
    }

    /**
     * Set the onboardingPublicKey property: Onboarding public key for provisioning the Managed identity for the
     * HybridAKS cluster. Will be used to create the hybridIdentityMetadata proxy resource and will not be persisted.
     *
     * @param onboardingPublicKey the onboardingPublicKey value to set.
     * @return the ArcAgentStatus object itself.
     */
    public ArcAgentStatus withOnboardingPublicKey(String onboardingPublicKey) {
        this.onboardingPublicKey = onboardingPublicKey;
        return this;
    }

    /**
     * Get the agentVersion property: Version of the Arc agents currently running on the Provisioned cluster resource.
     *
     * @return the agentVersion value.
     */
    public String agentVersion() {
        return this.agentVersion;
    }

    /**
     * Set the agentVersion property: Version of the Arc agents currently running on the Provisioned cluster resource.
     *
     * @param agentVersion the agentVersion value to set.
     * @return the ArcAgentStatus object itself.
     */
    public ArcAgentStatus withAgentVersion(String agentVersion) {
        this.agentVersion = agentVersion;
        return this;
    }

    /**
     * Get the coreCount property: Number of CPU cores present in the Provisioned cluster resource.
     *
     * @return the coreCount value.
     */
    public Long coreCount() {
        return this.coreCount;
    }

    /**
     * Set the coreCount property: Number of CPU cores present in the Provisioned cluster resource.
     *
     * @param coreCount the coreCount value to set.
     * @return the ArcAgentStatus object itself.
     */
    public ArcAgentStatus withCoreCount(Long coreCount) {
        this.coreCount = coreCount;
        return this;
    }

    /**
     * Get the managedIdentityCertificateExpirationTime property: ManagedIdentity certificate expiration time
     * (ValidUntil).
     *
     * @return the managedIdentityCertificateExpirationTime value.
     */
    public OffsetDateTime managedIdentityCertificateExpirationTime() {
        return this.managedIdentityCertificateExpirationTime;
    }

    /**
     * Set the managedIdentityCertificateExpirationTime property: ManagedIdentity certificate expiration time
     * (ValidUntil).
     *
     * @param managedIdentityCertificateExpirationTime the managedIdentityCertificateExpirationTime value to set.
     * @return the ArcAgentStatus object itself.
     */
    public ArcAgentStatus withManagedIdentityCertificateExpirationTime(
        OffsetDateTime managedIdentityCertificateExpirationTime) {
        this.managedIdentityCertificateExpirationTime = managedIdentityCertificateExpirationTime;
        return this;
    }

    /**
     * Get the lastConnectivityTime property: Last connected timestamp of the Provisioned cluster resource.
     *
     * @return the lastConnectivityTime value.
     */
    public OffsetDateTime lastConnectivityTime() {
        return this.lastConnectivityTime;
    }

    /**
     * Set the lastConnectivityTime property: Last connected timestamp of the Provisioned cluster resource.
     *
     * @param lastConnectivityTime the lastConnectivityTime value to set.
     * @return the ArcAgentStatus object itself.
     */
    public ArcAgentStatus withLastConnectivityTime(OffsetDateTime lastConnectivityTime) {
        this.lastConnectivityTime = lastConnectivityTime;
        return this;
    }

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