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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.synapse.models.CreateMode;
import com.azure.resourcemanager.synapse.models.StorageAccountType;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/**
 * SQL pool properties
 *
 * <p>Properties of a SQL Analytics pool.
 */
@Fluent
public final class SqlPoolResourceProperties {
    /*
     * Maximum size in bytes
     */
    @JsonProperty(value = "maxSizeBytes")
    private Long maxSizeBytes;

    /*
     * Collation mode
     */
    @JsonProperty(value = "collation")
    private String collation;

    /*
     * Source database to create from
     */
    @JsonProperty(value = "sourceDatabaseId")
    private String sourceDatabaseId;

    /*
     * Backup database to restore from
     */
    @JsonProperty(value = "recoverableDatabaseId")
    private String recoverableDatabaseId;

    /*
     * Resource state
     */
    @JsonProperty(value = "provisioningState")
    private String provisioningState;

    /*
     * Resource status
     */
    @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
    private String status;

    /*
     * Snapshot time to restore
     */
    @JsonProperty(value = "restorePointInTime")
    private OffsetDateTime restorePointInTime;

    /*
     * Specifies the mode of sql pool creation.
     *
     * Default: regular sql pool creation.
     *
     * PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool.
     * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be
     * specified.
     *
     * Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId  must be specified as the
     * recoverableDatabaseId to restore.
     *
     * Restore: Creates a sql pool by restoring a backup of a deleted sql  pool. SourceDatabaseId should be the sql
     * pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified.
     */
    @JsonProperty(value = "createMode")
    private CreateMode createMode;

    /*
     * Date the SQL pool was created
     */
    @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime creationDate;

    /*
     * The storage account type used to store backups for this sql pool.
     */
    @JsonProperty(value = "storageAccountType")
    private StorageAccountType storageAccountType;

    /*
     * Specifies the time that the sql pool was deleted
     */
    @JsonProperty(value = "sourceDatabaseDeletionDate")
    private OffsetDateTime sourceDatabaseDeletionDate;

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

    /**
     * Get the maxSizeBytes property: Maximum size in bytes.
     *
     * @return the maxSizeBytes value.
     */
    public Long maxSizeBytes() {
        return this.maxSizeBytes;
    }

    /**
     * Set the maxSizeBytes property: Maximum size in bytes.
     *
     * @param maxSizeBytes the maxSizeBytes value to set.
     * @return the SqlPoolResourceProperties object itself.
     */
    public SqlPoolResourceProperties withMaxSizeBytes(Long maxSizeBytes) {
        this.maxSizeBytes = maxSizeBytes;
        return this;
    }

    /**
     * Get the collation property: Collation mode.
     *
     * @return the collation value.
     */
    public String collation() {
        return this.collation;
    }

    /**
     * Set the collation property: Collation mode.
     *
     * @param collation the collation value to set.
     * @return the SqlPoolResourceProperties object itself.
     */
    public SqlPoolResourceProperties withCollation(String collation) {
        this.collation = collation;
        return this;
    }

    /**
     * Get the sourceDatabaseId property: Source database to create from.
     *
     * @return the sourceDatabaseId value.
     */
    public String sourceDatabaseId() {
        return this.sourceDatabaseId;
    }

    /**
     * Set the sourceDatabaseId property: Source database to create from.
     *
     * @param sourceDatabaseId the sourceDatabaseId value to set.
     * @return the SqlPoolResourceProperties object itself.
     */
    public SqlPoolResourceProperties withSourceDatabaseId(String sourceDatabaseId) {
        this.sourceDatabaseId = sourceDatabaseId;
        return this;
    }

    /**
     * Get the recoverableDatabaseId property: Backup database to restore from.
     *
     * @return the recoverableDatabaseId value.
     */
    public String recoverableDatabaseId() {
        return this.recoverableDatabaseId;
    }

    /**
     * Set the recoverableDatabaseId property: Backup database to restore from.
     *
     * @param recoverableDatabaseId the recoverableDatabaseId value to set.
     * @return the SqlPoolResourceProperties object itself.
     */
    public SqlPoolResourceProperties withRecoverableDatabaseId(String recoverableDatabaseId) {
        this.recoverableDatabaseId = recoverableDatabaseId;
        return this;
    }

    /**
     * Get the provisioningState property: Resource state.
     *
     * @return the provisioningState value.
     */
    public String provisioningState() {
        return this.provisioningState;
    }

    /**
     * Set the provisioningState property: Resource state.
     *
     * @param provisioningState the provisioningState value to set.
     * @return the SqlPoolResourceProperties object itself.
     */
    public SqlPoolResourceProperties withProvisioningState(String provisioningState) {
        this.provisioningState = provisioningState;
        return this;
    }

    /**
     * Get the status property: Resource status.
     *
     * @return the status value.
     */
    public String status() {
        return this.status;
    }

    /**
     * Get the restorePointInTime property: Snapshot time to restore.
     *
     * @return the restorePointInTime value.
     */
    public OffsetDateTime restorePointInTime() {
        return this.restorePointInTime;
    }

    /**
     * Set the restorePointInTime property: Snapshot time to restore.
     *
     * @param restorePointInTime the restorePointInTime value to set.
     * @return the SqlPoolResourceProperties object itself.
     */
    public SqlPoolResourceProperties withRestorePointInTime(OffsetDateTime restorePointInTime) {
        this.restorePointInTime = restorePointInTime;
        return this;
    }

    /**
     * Get the createMode property: Specifies the mode of sql pool creation.
     *
     * <p>Default: regular sql pool creation.
     *
     * <p>PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool.
     * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be
     * specified.
     *
     * <p>Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the
     * recoverableDatabaseId to restore.
     *
     * <p>Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql
     * pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified.
     *
     * @return the createMode value.
     */
    public CreateMode createMode() {
        return this.createMode;
    }

    /**
     * Set the createMode property: Specifies the mode of sql pool creation.
     *
     * <p>Default: regular sql pool creation.
     *
     * <p>PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool.
     * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be
     * specified.
     *
     * <p>Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the
     * recoverableDatabaseId to restore.
     *
     * <p>Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql
     * pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified.
     *
     * @param createMode the createMode value to set.
     * @return the SqlPoolResourceProperties object itself.
     */
    public SqlPoolResourceProperties withCreateMode(CreateMode createMode) {
        this.createMode = createMode;
        return this;
    }

    /**
     * Get the creationDate property: Date the SQL pool was created.
     *
     * @return the creationDate value.
     */
    public OffsetDateTime creationDate() {
        return this.creationDate;
    }

    /**
     * Get the storageAccountType property: The storage account type used to store backups for this sql pool.
     *
     * @return the storageAccountType value.
     */
    public StorageAccountType storageAccountType() {
        return this.storageAccountType;
    }

    /**
     * Set the storageAccountType property: The storage account type used to store backups for this sql pool.
     *
     * @param storageAccountType the storageAccountType value to set.
     * @return the SqlPoolResourceProperties object itself.
     */
    public SqlPoolResourceProperties withStorageAccountType(StorageAccountType storageAccountType) {
        this.storageAccountType = storageAccountType;
        return this;
    }

    /**
     * Get the sourceDatabaseDeletionDate property: Specifies the time that the sql pool was deleted.
     *
     * @return the sourceDatabaseDeletionDate value.
     */
    public OffsetDateTime sourceDatabaseDeletionDate() {
        return this.sourceDatabaseDeletionDate;
    }

    /**
     * Set the sourceDatabaseDeletionDate property: Specifies the time that the sql pool was deleted.
     *
     * @param sourceDatabaseDeletionDate the sourceDatabaseDeletionDate value to set.
     * @return the SqlPoolResourceProperties object itself.
     */
    public SqlPoolResourceProperties withSourceDatabaseDeletionDate(OffsetDateTime sourceDatabaseDeletionDate) {
        this.sourceDatabaseDeletionDate = sourceDatabaseDeletionDate;
        return this;
    }

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