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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.avs.models.CloudLinkStatus;
import com.fasterxml.jackson.annotation.JsonProperty;

/** A cloud link resource. */
@Fluent
public final class CloudLinkInner extends ProxyResource {
    /*
     * The properties of a cloud link.
     */
    @JsonProperty(value = "properties")
    private CloudLinkProperties innerProperties;

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

    /**
     * Get the innerProperties property: The properties of a cloud link.
     *
     * @return the innerProperties value.
     */
    private CloudLinkProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the status property: The state of the cloud link.
     *
     * @return the status value.
     */
    public CloudLinkStatus status() {
        return this.innerProperties() == null ? null : this.innerProperties().status();
    }

    /**
     * Get the linkedCloud property: Identifier of the other private cloud participating in the link.
     *
     * @return the linkedCloud value.
     */
    public String linkedCloud() {
        return this.innerProperties() == null ? null : this.innerProperties().linkedCloud();
    }

    /**
     * Set the linkedCloud property: Identifier of the other private cloud participating in the link.
     *
     * @param linkedCloud the linkedCloud value to set.
     * @return the CloudLinkInner object itself.
     */
    public CloudLinkInner withLinkedCloud(String linkedCloud) {
        if (this.innerProperties() == null) {
            this.innerProperties = new CloudLinkProperties();
        }
        this.innerProperties().withLinkedCloud(linkedCloud);
        return this;
    }

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