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

package com.azure.resourcemanager.appcomplianceautomation.models;

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

/** Snapshot's download request. */
@Fluent
public final class SnapshotDownloadRequest {
    /*
     * Tenant id.
     */
    @JsonProperty(value = "reportCreatorTenantId")
    private String reportCreatorTenantId;

    /*
     * Indicates the download type.
     */
    @JsonProperty(value = "downloadType", required = true)
    private DownloadType downloadType;

    /*
     * The offerGuid which mapping to the reports.
     */
    @JsonProperty(value = "offerGuid")
    private String offerGuid;

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

    /**
     * Get the reportCreatorTenantId property: Tenant id.
     *
     * @return the reportCreatorTenantId value.
     */
    public String reportCreatorTenantId() {
        return this.reportCreatorTenantId;
    }

    /**
     * Set the reportCreatorTenantId property: Tenant id.
     *
     * @param reportCreatorTenantId the reportCreatorTenantId value to set.
     * @return the SnapshotDownloadRequest object itself.
     */
    public SnapshotDownloadRequest withReportCreatorTenantId(String reportCreatorTenantId) {
        this.reportCreatorTenantId = reportCreatorTenantId;
        return this;
    }

    /**
     * Get the downloadType property: Indicates the download type.
     *
     * @return the downloadType value.
     */
    public DownloadType downloadType() {
        return this.downloadType;
    }

    /**
     * Set the downloadType property: Indicates the download type.
     *
     * @param downloadType the downloadType value to set.
     * @return the SnapshotDownloadRequest object itself.
     */
    public SnapshotDownloadRequest withDownloadType(DownloadType downloadType) {
        this.downloadType = downloadType;
        return this;
    }

    /**
     * Get the offerGuid property: The offerGuid which mapping to the reports.
     *
     * @return the offerGuid value.
     */
    public String offerGuid() {
        return this.offerGuid;
    }

    /**
     * Set the offerGuid property: The offerGuid which mapping to the reports.
     *
     * @param offerGuid the offerGuid value to set.
     * @return the SnapshotDownloadRequest object itself.
     */
    public SnapshotDownloadRequest withOfferGuid(String offerGuid) {
        this.offerGuid = offerGuid;
        return this;
    }

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

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