// 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.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Contains the information necessary to perform a create Sql pool restore point operation. */
@Fluent
public final class CreateSqlPoolRestorePointDefinition {
    /*
     * The restore point label to apply
     */
    @JsonProperty(value = "restorePointLabel", required = true)
    private String restorePointLabel;

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

    /**
     * Get the restorePointLabel property: The restore point label to apply.
     *
     * @return the restorePointLabel value.
     */
    public String restorePointLabel() {
        return this.restorePointLabel;
    }

    /**
     * Set the restorePointLabel property: The restore point label to apply.
     *
     * @param restorePointLabel the restorePointLabel value to set.
     * @return the CreateSqlPoolRestorePointDefinition object itself.
     */
    public CreateSqlPoolRestorePointDefinition withRestorePointLabel(String restorePointLabel) {
        this.restorePointLabel = restorePointLabel;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (restorePointLabel() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property restorePointLabel in model CreateSqlPoolRestorePointDefinition"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(CreateSqlPoolRestorePointDefinition.class);
}
