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

/** Request body to get the configuration for the region. */
@Fluent
public final class RegionConfigurationRequest {
    /*
     * Request body to get the availability for scheduling orders.
     */
    @JsonProperty(value = "scheduleAvailabilityRequest")
    private ScheduleAvailabilityRequest scheduleAvailabilityRequest;

    /*
     * Request body to get the transport availability for given sku.
     */
    @JsonProperty(value = "transportAvailabilityRequest")
    private TransportAvailabilityRequest transportAvailabilityRequest;

    /*
     * Request body to get the datacenter address for given sku.
     */
    @JsonProperty(value = "datacenterAddressRequest")
    private DatacenterAddressRequest datacenterAddressRequest;

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

    /**
     * Get the scheduleAvailabilityRequest property: Request body to get the availability for scheduling orders.
     *
     * @return the scheduleAvailabilityRequest value.
     */
    public ScheduleAvailabilityRequest scheduleAvailabilityRequest() {
        return this.scheduleAvailabilityRequest;
    }

    /**
     * Set the scheduleAvailabilityRequest property: Request body to get the availability for scheduling orders.
     *
     * @param scheduleAvailabilityRequest the scheduleAvailabilityRequest value to set.
     * @return the RegionConfigurationRequest object itself.
     */
    public RegionConfigurationRequest withScheduleAvailabilityRequest(
        ScheduleAvailabilityRequest scheduleAvailabilityRequest) {
        this.scheduleAvailabilityRequest = scheduleAvailabilityRequest;
        return this;
    }

    /**
     * Get the transportAvailabilityRequest property: Request body to get the transport availability for given sku.
     *
     * @return the transportAvailabilityRequest value.
     */
    public TransportAvailabilityRequest transportAvailabilityRequest() {
        return this.transportAvailabilityRequest;
    }

    /**
     * Set the transportAvailabilityRequest property: Request body to get the transport availability for given sku.
     *
     * @param transportAvailabilityRequest the transportAvailabilityRequest value to set.
     * @return the RegionConfigurationRequest object itself.
     */
    public RegionConfigurationRequest withTransportAvailabilityRequest(
        TransportAvailabilityRequest transportAvailabilityRequest) {
        this.transportAvailabilityRequest = transportAvailabilityRequest;
        return this;
    }

    /**
     * Get the datacenterAddressRequest property: Request body to get the datacenter address for given sku.
     *
     * @return the datacenterAddressRequest value.
     */
    public DatacenterAddressRequest datacenterAddressRequest() {
        return this.datacenterAddressRequest;
    }

    /**
     * Set the datacenterAddressRequest property: Request body to get the datacenter address for given sku.
     *
     * @param datacenterAddressRequest the datacenterAddressRequest value to set.
     * @return the RegionConfigurationRequest object itself.
     */
    public RegionConfigurationRequest withDatacenterAddressRequest(DatacenterAddressRequest datacenterAddressRequest) {
        this.datacenterAddressRequest = datacenterAddressRequest;
        return this;
    }

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