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

/** ExtendedLocation details data. */
@Fluent
public final class A2AExtendedLocationDetails {
    /*
     * The primary ExtendedLocation.
     */
    @JsonProperty(value = "primaryExtendedLocation")
    private ExtendedLocation primaryExtendedLocation;

    /*
     * The recovery ExtendedLocation.
     */
    @JsonProperty(value = "recoveryExtendedLocation")
    private ExtendedLocation recoveryExtendedLocation;

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

    /**
     * Get the primaryExtendedLocation property: The primary ExtendedLocation.
     *
     * @return the primaryExtendedLocation value.
     */
    public ExtendedLocation primaryExtendedLocation() {
        return this.primaryExtendedLocation;
    }

    /**
     * Set the primaryExtendedLocation property: The primary ExtendedLocation.
     *
     * @param primaryExtendedLocation the primaryExtendedLocation value to set.
     * @return the A2AExtendedLocationDetails object itself.
     */
    public A2AExtendedLocationDetails withPrimaryExtendedLocation(ExtendedLocation primaryExtendedLocation) {
        this.primaryExtendedLocation = primaryExtendedLocation;
        return this;
    }

    /**
     * Get the recoveryExtendedLocation property: The recovery ExtendedLocation.
     *
     * @return the recoveryExtendedLocation value.
     */
    public ExtendedLocation recoveryExtendedLocation() {
        return this.recoveryExtendedLocation;
    }

    /**
     * Set the recoveryExtendedLocation property: The recovery ExtendedLocation.
     *
     * @param recoveryExtendedLocation the recoveryExtendedLocation value to set.
     * @return the A2AExtendedLocationDetails object itself.
     */
    public A2AExtendedLocationDetails withRecoveryExtendedLocation(ExtendedLocation recoveryExtendedLocation) {
        this.recoveryExtendedLocation = recoveryExtendedLocation;
        return this;
    }

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