// 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.VMGroupStatusEnum;
import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** NSX VM Group. */
@Fluent
public final class WorkloadNetworkVMGroupInner extends ProxyResource {
    /*
     * VM Group properties.
     */
    @JsonProperty(value = "properties")
    private WorkloadNetworkVMGroupProperties innerProperties;

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

    /**
     * Get the innerProperties property: VM Group properties.
     *
     * @return the innerProperties value.
     */
    private WorkloadNetworkVMGroupProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the displayName property: Display name of the VM group.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.innerProperties() == null ? null : this.innerProperties().displayName();
    }

    /**
     * Set the displayName property: Display name of the VM group.
     *
     * @param displayName the displayName value to set.
     * @return the WorkloadNetworkVMGroupInner object itself.
     */
    public WorkloadNetworkVMGroupInner withDisplayName(String displayName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkVMGroupProperties();
        }
        this.innerProperties().withDisplayName(displayName);
        return this;
    }

    /**
     * Get the members property: Virtual machine members of this group.
     *
     * @return the members value.
     */
    public List<String> members() {
        return this.innerProperties() == null ? null : this.innerProperties().members();
    }

    /**
     * Set the members property: Virtual machine members of this group.
     *
     * @param members the members value to set.
     * @return the WorkloadNetworkVMGroupInner object itself.
     */
    public WorkloadNetworkVMGroupInner withMembers(List<String> members) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkVMGroupProperties();
        }
        this.innerProperties().withMembers(members);
        return this;
    }

    /**
     * Get the status property: VM Group status.
     *
     * @return the status value.
     */
    public VMGroupStatusEnum status() {
        return this.innerProperties() == null ? null : this.innerProperties().status();
    }

    /**
     * Get the provisioningState property: The provisioning state.
     *
     * @return the provisioningState value.
     */
    public WorkloadNetworkVMGroupProvisioningState provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the revision property: NSX revision number.
     *
     * @return the revision value.
     */
    public Long revision() {
        return this.innerProperties() == null ? null : this.innerProperties().revision();
    }

    /**
     * Set the revision property: NSX revision number.
     *
     * @param revision the revision value to set.
     * @return the WorkloadNetworkVMGroupInner object itself.
     */
    public WorkloadNetworkVMGroupInner withRevision(Long revision) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkVMGroupProperties();
        }
        this.innerProperties().withRevision(revision);
        return this;
    }

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