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

package com.azure.resourcemanager.securityinsights.models;

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

/** Describes team properties. */
@Fluent
public final class TeamProperties {
    /*
     * The name of the team
     */
    @JsonProperty(value = "teamName", required = true)
    private String teamName;

    /*
     * The description of the team
     */
    @JsonProperty(value = "teamDescription")
    private String teamDescription;

    /*
     * List of member IDs to add to the team
     */
    @JsonProperty(value = "memberIds")
    private List<UUID> memberIds;

    /*
     * List of group IDs to add their members to the team
     */
    @JsonProperty(value = "groupIds")
    private List<UUID> groupIds;

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

    /**
     * Set the teamName property: The name of the team.
     *
     * @param teamName the teamName value to set.
     * @return the TeamProperties object itself.
     */
    public TeamProperties withTeamName(String teamName) {
        this.teamName = teamName;
        return this;
    }

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

    /**
     * Set the teamDescription property: The description of the team.
     *
     * @param teamDescription the teamDescription value to set.
     * @return the TeamProperties object itself.
     */
    public TeamProperties withTeamDescription(String teamDescription) {
        this.teamDescription = teamDescription;
        return this;
    }

    /**
     * Get the memberIds property: List of member IDs to add to the team.
     *
     * @return the memberIds value.
     */
    public List<UUID> memberIds() {
        return this.memberIds;
    }

    /**
     * Set the memberIds property: List of member IDs to add to the team.
     *
     * @param memberIds the memberIds value to set.
     * @return the TeamProperties object itself.
     */
    public TeamProperties withMemberIds(List<UUID> memberIds) {
        this.memberIds = memberIds;
        return this;
    }

    /**
     * Get the groupIds property: List of group IDs to add their members to the team.
     *
     * @return the groupIds value.
     */
    public List<UUID> groupIds() {
        return this.groupIds;
    }

    /**
     * Set the groupIds property: List of group IDs to add their members to the team.
     *
     * @param groupIds the groupIds value to set.
     * @return the TeamProperties object itself.
     */
    public TeamProperties withGroupIds(List<UUID> groupIds) {
        this.groupIds = groupIds;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (teamName() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property teamName in model TeamProperties"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(TeamProperties.class);
}
