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

package com.azure.resourcemanager.containerservicefleet.models;

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

/** The status of a UpdateGroup. */
@Immutable
public final class UpdateGroupStatus {
    /*
     * The status of the UpdateGroup.
     */
    @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
    private UpdateStatus status;

    /*
     * The name of the UpdateGroup.
     */
    @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
    private String name;

    /*
     * The list of member this UpdateGroup updates.
     */
    @JsonProperty(value = "members", access = JsonProperty.Access.WRITE_ONLY)
    private List<MemberUpdateStatus> members;

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

    /**
     * Get the status property: The status of the UpdateGroup.
     *
     * @return the status value.
     */
    public UpdateStatus status() {
        return this.status;
    }

    /**
     * Get the name property: The name of the UpdateGroup.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Get the members property: The list of member this UpdateGroup updates.
     *
     * @return the members value.
     */
    public List<MemberUpdateStatus> members() {
        return this.members;
    }

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