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

package com.azure.resourcemanager.recoveryservicessiterecovery.models;

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

/** Azure Fabric Specific Details. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType")
@JsonTypeName("Azure")
@Fluent
public final class AzureFabricSpecificDetails extends FabricSpecificDetails {
    /*
     * The Location for the Azure fabric.
     */
    @JsonProperty(value = "location")
    private String location;

    /*
     * The container Ids for the Azure fabric.
     */
    @JsonProperty(value = "containerIds")
    private List<String> containerIds;

    /*
     * The zones.
     */
    @JsonProperty(value = "zones")
    private List<A2AZoneDetails> zones;

    /*
     * The ExtendedLocations.
     */
    @JsonProperty(value = "extendedLocations")
    private List<A2AExtendedLocationDetails> extendedLocations;

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

    /**
     * Get the location property: The Location for the Azure fabric.
     *
     * @return the location value.
     */
    public String location() {
        return this.location;
    }

    /**
     * Set the location property: The Location for the Azure fabric.
     *
     * @param location the location value to set.
     * @return the AzureFabricSpecificDetails object itself.
     */
    public AzureFabricSpecificDetails withLocation(String location) {
        this.location = location;
        return this;
    }

    /**
     * Get the containerIds property: The container Ids for the Azure fabric.
     *
     * @return the containerIds value.
     */
    public List<String> containerIds() {
        return this.containerIds;
    }

    /**
     * Set the containerIds property: The container Ids for the Azure fabric.
     *
     * @param containerIds the containerIds value to set.
     * @return the AzureFabricSpecificDetails object itself.
     */
    public AzureFabricSpecificDetails withContainerIds(List<String> containerIds) {
        this.containerIds = containerIds;
        return this;
    }

    /**
     * Get the zones property: The zones.
     *
     * @return the zones value.
     */
    public List<A2AZoneDetails> zones() {
        return this.zones;
    }

    /**
     * Set the zones property: The zones.
     *
     * @param zones the zones value to set.
     * @return the AzureFabricSpecificDetails object itself.
     */
    public AzureFabricSpecificDetails withZones(List<A2AZoneDetails> zones) {
        this.zones = zones;
        return this;
    }

    /**
     * Get the extendedLocations property: The ExtendedLocations.
     *
     * @return the extendedLocations value.
     */
    public List<A2AExtendedLocationDetails> extendedLocations() {
        return this.extendedLocations;
    }

    /**
     * Set the extendedLocations property: The ExtendedLocations.
     *
     * @param extendedLocations the extendedLocations value to set.
     * @return the AzureFabricSpecificDetails object itself.
     */
    public AzureFabricSpecificDetails withExtendedLocations(List<A2AExtendedLocationDetails> extendedLocations) {
        this.extendedLocations = extendedLocations;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
        if (zones() != null) {
            zones().forEach(e -> e.validate());
        }
        if (extendedLocations() != null) {
            extendedLocations().forEach(e -> e.validate());
        }
    }
}
