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

package com.azure.resourcemanager.redisenterprise.models;

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

/**
 * Export an RDB file into a target database
 *
 * <p>Parameters for a Redis Enterprise export operation.
 */
@Fluent
public final class ExportClusterParameters {
    /*
     * SAS URI for the target directory to export to
     */
    @JsonProperty(value = "sasUri", required = true)
    private String sasUri;

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

    /**
     * Get the sasUri property: SAS URI for the target directory to export to.
     *
     * @return the sasUri value.
     */
    public String sasUri() {
        return this.sasUri;
    }

    /**
     * Set the sasUri property: SAS URI for the target directory to export to.
     *
     * @param sasUri the sasUri value to set.
     * @return the ExportClusterParameters object itself.
     */
    public ExportClusterParameters withSasUri(String sasUri) {
        this.sasUri = sasUri;
        return this;
    }

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

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