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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.sql.models.SyncAgentState;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Properties of an Azure SQL Database sync agent. */
@Fluent
public final class SyncAgentProperties {
    /*
     * Name of the sync agent.
     */
    @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
    private String name;

    /*
     * ARM resource id of the sync database in the sync agent.
     */
    @JsonProperty(value = "syncDatabaseId")
    private String syncDatabaseId;

    /*
     * Last alive time of the sync agent.
     */
    @JsonProperty(value = "lastAliveTime", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime lastAliveTime;

    /*
     * State of the sync agent.
     */
    @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY)
    private SyncAgentState state;

    /*
     * If the sync agent version is up to date.
     */
    @JsonProperty(value = "isUpToDate", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean isUpToDate;

    /*
     * Expiration time of the sync agent version.
     */
    @JsonProperty(value = "expiryTime", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime expiryTime;

    /*
     * Version of the sync agent.
     */
    @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY)
    private String version;

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

    /**
     * Get the name property: Name of the sync agent.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Get the syncDatabaseId property: ARM resource id of the sync database in the sync agent.
     *
     * @return the syncDatabaseId value.
     */
    public String syncDatabaseId() {
        return this.syncDatabaseId;
    }

    /**
     * Set the syncDatabaseId property: ARM resource id of the sync database in the sync agent.
     *
     * @param syncDatabaseId the syncDatabaseId value to set.
     * @return the SyncAgentProperties object itself.
     */
    public SyncAgentProperties withSyncDatabaseId(String syncDatabaseId) {
        this.syncDatabaseId = syncDatabaseId;
        return this;
    }

    /**
     * Get the lastAliveTime property: Last alive time of the sync agent.
     *
     * @return the lastAliveTime value.
     */
    public OffsetDateTime lastAliveTime() {
        return this.lastAliveTime;
    }

    /**
     * Get the state property: State of the sync agent.
     *
     * @return the state value.
     */
    public SyncAgentState state() {
        return this.state;
    }

    /**
     * Get the isUpToDate property: If the sync agent version is up to date.
     *
     * @return the isUpToDate value.
     */
    public Boolean isUpToDate() {
        return this.isUpToDate;
    }

    /**
     * Get the expiryTime property: Expiration time of the sync agent version.
     *
     * @return the expiryTime value.
     */
    public OffsetDateTime expiryTime() {
        return this.expiryTime;
    }

    /**
     * Get the version property: Version of the sync agent.
     *
     * @return the version value.
     */
    public String version() {
        return this.version;
    }

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