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

package com.azure.resourcemanager.recoveryservicesbackup.models;

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

/** Extended information of the container. */
@Fluent
public final class AzureWorkloadContainerExtendedInfo {
    /*
     * Host Os Name in case of Stand Alone and Cluster Name in case of distributed container.
     */
    @JsonProperty(value = "hostServerName")
    private String hostServerName;

    /*
     * Inquiry Status for the container.
     */
    @JsonProperty(value = "inquiryInfo")
    private InquiryInfo inquiryInfo;

    /*
     * List of the nodes in case of distributed container.
     */
    @JsonProperty(value = "nodesList")
    private List<DistributedNodesInfo> nodesList;

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

    /**
     * Get the hostServerName property: Host Os Name in case of Stand Alone and Cluster Name in case of distributed
     * container.
     *
     * @return the hostServerName value.
     */
    public String hostServerName() {
        return this.hostServerName;
    }

    /**
     * Set the hostServerName property: Host Os Name in case of Stand Alone and Cluster Name in case of distributed
     * container.
     *
     * @param hostServerName the hostServerName value to set.
     * @return the AzureWorkloadContainerExtendedInfo object itself.
     */
    public AzureWorkloadContainerExtendedInfo withHostServerName(String hostServerName) {
        this.hostServerName = hostServerName;
        return this;
    }

    /**
     * Get the inquiryInfo property: Inquiry Status for the container.
     *
     * @return the inquiryInfo value.
     */
    public InquiryInfo inquiryInfo() {
        return this.inquiryInfo;
    }

    /**
     * Set the inquiryInfo property: Inquiry Status for the container.
     *
     * @param inquiryInfo the inquiryInfo value to set.
     * @return the AzureWorkloadContainerExtendedInfo object itself.
     */
    public AzureWorkloadContainerExtendedInfo withInquiryInfo(InquiryInfo inquiryInfo) {
        this.inquiryInfo = inquiryInfo;
        return this;
    }

    /**
     * Get the nodesList property: List of the nodes in case of distributed container.
     *
     * @return the nodesList value.
     */
    public List<DistributedNodesInfo> nodesList() {
        return this.nodesList;
    }

    /**
     * Set the nodesList property: List of the nodes in case of distributed container.
     *
     * @param nodesList the nodesList value to set.
     * @return the AzureWorkloadContainerExtendedInfo object itself.
     */
    public AzureWorkloadContainerExtendedInfo withNodesList(List<DistributedNodesInfo> nodesList) {
        this.nodesList = nodesList;
        return this;
    }

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