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

package com.azure.resourcemanager.storageimportexport.fluent.models;

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

/** Provides information about an Azure data center location. */
@Fluent
public final class LocationInner {
    /*
     * Specifies the resource identifier of the location.
     */
    @JsonProperty(value = "id")
    private String id;

    /*
     * Specifies the name of the location. Use List Locations to get all supported locations.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * Specifies the type of the location.
     */
    @JsonProperty(value = "type")
    private String type;

    /*
     * location properties
     */
    @JsonProperty(value = "properties")
    private LocationProperties innerProperties;

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

    /**
     * Get the id property: Specifies the resource identifier of the location.
     *
     * @return the id value.
     */
    public String id() {
        return this.id;
    }

    /**
     * Set the id property: Specifies the resource identifier of the location.
     *
     * @param id the id value to set.
     * @return the LocationInner object itself.
     */
    public LocationInner withId(String id) {
        this.id = id;
        return this;
    }

    /**
     * Get the name property: Specifies the name of the location. Use List Locations to get all supported locations.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: Specifies the name of the location. Use List Locations to get all supported locations.
     *
     * @param name the name value to set.
     * @return the LocationInner object itself.
     */
    public LocationInner withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the type property: Specifies the type of the location.
     *
     * @return the type value.
     */
    public String type() {
        return this.type;
    }

    /**
     * Set the type property: Specifies the type of the location.
     *
     * @param type the type value to set.
     * @return the LocationInner object itself.
     */
    public LocationInner withType(String type) {
        this.type = type;
        return this;
    }

    /**
     * Get the innerProperties property: location properties.
     *
     * @return the innerProperties value.
     */
    private LocationProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the recipientName property: The recipient name to use when shipping the drives to the Azure data center.
     *
     * @return the recipientName value.
     */
    public String recipientName() {
        return this.innerProperties() == null ? null : this.innerProperties().recipientName();
    }

    /**
     * Set the recipientName property: The recipient name to use when shipping the drives to the Azure data center.
     *
     * @param recipientName the recipientName value to set.
     * @return the LocationInner object itself.
     */
    public LocationInner withRecipientName(String recipientName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LocationProperties();
        }
        this.innerProperties().withRecipientName(recipientName);
        return this;
    }

    /**
     * Get the streetAddress1 property: The first line of the street address to use when shipping the drives to the
     * Azure data center.
     *
     * @return the streetAddress1 value.
     */
    public String streetAddress1() {
        return this.innerProperties() == null ? null : this.innerProperties().streetAddress1();
    }

    /**
     * Set the streetAddress1 property: The first line of the street address to use when shipping the drives to the
     * Azure data center.
     *
     * @param streetAddress1 the streetAddress1 value to set.
     * @return the LocationInner object itself.
     */
    public LocationInner withStreetAddress1(String streetAddress1) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LocationProperties();
        }
        this.innerProperties().withStreetAddress1(streetAddress1);
        return this;
    }

    /**
     * Get the streetAddress2 property: The second line of the street address to use when shipping the drives to the
     * Azure data center.
     *
     * @return the streetAddress2 value.
     */
    public String streetAddress2() {
        return this.innerProperties() == null ? null : this.innerProperties().streetAddress2();
    }

    /**
     * Set the streetAddress2 property: The second line of the street address to use when shipping the drives to the
     * Azure data center.
     *
     * @param streetAddress2 the streetAddress2 value to set.
     * @return the LocationInner object itself.
     */
    public LocationInner withStreetAddress2(String streetAddress2) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LocationProperties();
        }
        this.innerProperties().withStreetAddress2(streetAddress2);
        return this;
    }

    /**
     * Get the city property: The city name to use when shipping the drives to the Azure data center.
     *
     * @return the city value.
     */
    public String city() {
        return this.innerProperties() == null ? null : this.innerProperties().city();
    }

    /**
     * Set the city property: The city name to use when shipping the drives to the Azure data center.
     *
     * @param city the city value to set.
     * @return the LocationInner object itself.
     */
    public LocationInner withCity(String city) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LocationProperties();
        }
        this.innerProperties().withCity(city);
        return this;
    }

    /**
     * Get the stateOrProvince property: The state or province to use when shipping the drives to the Azure data center.
     *
     * @return the stateOrProvince value.
     */
    public String stateOrProvince() {
        return this.innerProperties() == null ? null : this.innerProperties().stateOrProvince();
    }

    /**
     * Set the stateOrProvince property: The state or province to use when shipping the drives to the Azure data center.
     *
     * @param stateOrProvince the stateOrProvince value to set.
     * @return the LocationInner object itself.
     */
    public LocationInner withStateOrProvince(String stateOrProvince) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LocationProperties();
        }
        this.innerProperties().withStateOrProvince(stateOrProvince);
        return this;
    }

    /**
     * Get the postalCode property: The postal code to use when shipping the drives to the Azure data center.
     *
     * @return the postalCode value.
     */
    public String postalCode() {
        return this.innerProperties() == null ? null : this.innerProperties().postalCode();
    }

    /**
     * Set the postalCode property: The postal code to use when shipping the drives to the Azure data center.
     *
     * @param postalCode the postalCode value to set.
     * @return the LocationInner object itself.
     */
    public LocationInner withPostalCode(String postalCode) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LocationProperties();
        }
        this.innerProperties().withPostalCode(postalCode);
        return this;
    }

    /**
     * Get the countryOrRegion property: The country or region to use when shipping the drives to the Azure data center.
     *
     * @return the countryOrRegion value.
     */
    public String countryOrRegion() {
        return this.innerProperties() == null ? null : this.innerProperties().countryOrRegion();
    }

    /**
     * Set the countryOrRegion property: The country or region to use when shipping the drives to the Azure data center.
     *
     * @param countryOrRegion the countryOrRegion value to set.
     * @return the LocationInner object itself.
     */
    public LocationInner withCountryOrRegion(String countryOrRegion) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LocationProperties();
        }
        this.innerProperties().withCountryOrRegion(countryOrRegion);
        return this;
    }

    /**
     * Get the phone property: The phone number for the Azure data center.
     *
     * @return the phone value.
     */
    public String phone() {
        return this.innerProperties() == null ? null : this.innerProperties().phone();
    }

    /**
     * Set the phone property: The phone number for the Azure data center.
     *
     * @param phone the phone value to set.
     * @return the LocationInner object itself.
     */
    public LocationInner withPhone(String phone) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LocationProperties();
        }
        this.innerProperties().withPhone(phone);
        return this;
    }

    /**
     * Get the additionalShippingInformation property: Additional shipping information for customer, specific to
     * datacenter to which customer should send their disks.
     *
     * @return the additionalShippingInformation value.
     */
    public String additionalShippingInformation() {
        return this.innerProperties() == null ? null : this.innerProperties().additionalShippingInformation();
    }

    /**
     * Set the additionalShippingInformation property: Additional shipping information for customer, specific to
     * datacenter to which customer should send their disks.
     *
     * @param additionalShippingInformation the additionalShippingInformation value to set.
     * @return the LocationInner object itself.
     */
    public LocationInner withAdditionalShippingInformation(String additionalShippingInformation) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LocationProperties();
        }
        this.innerProperties().withAdditionalShippingInformation(additionalShippingInformation);
        return this;
    }

    /**
     * Get the supportedCarriers property: A list of carriers that are supported at this location.
     *
     * @return the supportedCarriers value.
     */
    public List<String> supportedCarriers() {
        return this.innerProperties() == null ? null : this.innerProperties().supportedCarriers();
    }

    /**
     * Set the supportedCarriers property: A list of carriers that are supported at this location.
     *
     * @param supportedCarriers the supportedCarriers value to set.
     * @return the LocationInner object itself.
     */
    public LocationInner withSupportedCarriers(List<String> supportedCarriers) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LocationProperties();
        }
        this.innerProperties().withSupportedCarriers(supportedCarriers);
        return this;
    }

    /**
     * Get the alternateLocations property: A list of location IDs that should be used to ship shipping drives to for
     * jobs created against the current location. If the current location is active, it will be part of the list. If it
     * is temporarily closed due to maintenance, this list may contain other locations.
     *
     * @return the alternateLocations value.
     */
    public List<String> alternateLocations() {
        return this.innerProperties() == null ? null : this.innerProperties().alternateLocations();
    }

    /**
     * Set the alternateLocations property: A list of location IDs that should be used to ship shipping drives to for
     * jobs created against the current location. If the current location is active, it will be part of the list. If it
     * is temporarily closed due to maintenance, this list may contain other locations.
     *
     * @param alternateLocations the alternateLocations value to set.
     * @return the LocationInner object itself.
     */
    public LocationInner withAlternateLocations(List<String> alternateLocations) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LocationProperties();
        }
        this.innerProperties().withAlternateLocations(alternateLocations);
        return this;
    }

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