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

package com.azure.resourcemanager.databox.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Preferences related to the order. */
@Fluent
public final class Preferences {
    /*
     * Preferred data center region.
     */
    @JsonProperty(value = "preferredDataCenterRegion")
    private List<String> preferredDataCenterRegion;

    /*
     * Preferences related to the shipment logistics of the sku.
     */
    @JsonProperty(value = "transportPreferences")
    private TransportPreferences transportPreferences;

    /*
     * Optional Preferences related to the reverse shipment logistics of the sku.
     */
    @JsonProperty(value = "reverseTransportPreferences")
    private TransportPreferences reverseTransportPreferences;

    /*
     * Preferences related to the Encryption.
     */
    @JsonProperty(value = "encryptionPreferences")
    private EncryptionPreferences encryptionPreferences;

    /*
     * Preferences related to the Access Tier of storage accounts.
     */
    @JsonProperty(value = "storageAccountAccessTierPreferences")
    private List<String> storageAccountAccessTierPreferences;

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

    /**
     * Get the preferredDataCenterRegion property: Preferred data center region.
     *
     * @return the preferredDataCenterRegion value.
     */
    public List<String> preferredDataCenterRegion() {
        return this.preferredDataCenterRegion;
    }

    /**
     * Set the preferredDataCenterRegion property: Preferred data center region.
     *
     * @param preferredDataCenterRegion the preferredDataCenterRegion value to set.
     * @return the Preferences object itself.
     */
    public Preferences withPreferredDataCenterRegion(List<String> preferredDataCenterRegion) {
        this.preferredDataCenterRegion = preferredDataCenterRegion;
        return this;
    }

    /**
     * Get the transportPreferences property: Preferences related to the shipment logistics of the sku.
     *
     * @return the transportPreferences value.
     */
    public TransportPreferences transportPreferences() {
        return this.transportPreferences;
    }

    /**
     * Set the transportPreferences property: Preferences related to the shipment logistics of the sku.
     *
     * @param transportPreferences the transportPreferences value to set.
     * @return the Preferences object itself.
     */
    public Preferences withTransportPreferences(TransportPreferences transportPreferences) {
        this.transportPreferences = transportPreferences;
        return this;
    }

    /**
     * Get the reverseTransportPreferences property: Optional Preferences related to the reverse shipment logistics of
     * the sku.
     *
     * @return the reverseTransportPreferences value.
     */
    public TransportPreferences reverseTransportPreferences() {
        return this.reverseTransportPreferences;
    }

    /**
     * Set the reverseTransportPreferences property: Optional Preferences related to the reverse shipment logistics of
     * the sku.
     *
     * @param reverseTransportPreferences the reverseTransportPreferences value to set.
     * @return the Preferences object itself.
     */
    public Preferences withReverseTransportPreferences(TransportPreferences reverseTransportPreferences) {
        this.reverseTransportPreferences = reverseTransportPreferences;
        return this;
    }

    /**
     * Get the encryptionPreferences property: Preferences related to the Encryption.
     *
     * @return the encryptionPreferences value.
     */
    public EncryptionPreferences encryptionPreferences() {
        return this.encryptionPreferences;
    }

    /**
     * Set the encryptionPreferences property: Preferences related to the Encryption.
     *
     * @param encryptionPreferences the encryptionPreferences value to set.
     * @return the Preferences object itself.
     */
    public Preferences withEncryptionPreferences(EncryptionPreferences encryptionPreferences) {
        this.encryptionPreferences = encryptionPreferences;
        return this;
    }

    /**
     * Get the storageAccountAccessTierPreferences property: Preferences related to the Access Tier of storage accounts.
     *
     * @return the storageAccountAccessTierPreferences value.
     */
    public List<String> storageAccountAccessTierPreferences() {
        return this.storageAccountAccessTierPreferences;
    }

    /**
     * Set the storageAccountAccessTierPreferences property: Preferences related to the Access Tier of storage accounts.
     *
     * @param storageAccountAccessTierPreferences the storageAccountAccessTierPreferences value to set.
     * @return the Preferences object itself.
     */
    public Preferences withStorageAccountAccessTierPreferences(List<String> storageAccountAccessTierPreferences) {
        this.storageAccountAccessTierPreferences = storageAccountAccessTierPreferences;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (transportPreferences() != null) {
            transportPreferences().validate();
        }
        if (reverseTransportPreferences() != null) {
            reverseTransportPreferences().validate();
        }
        if (encryptionPreferences() != null) {
            encryptionPreferences().validate();
        }
    }
}
