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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.timeseriesinsights.models.AccessPolicyRole;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The AccessPolicyResourceProperties model. */
@Fluent
public final class AccessPolicyResourceProperties {
    /*
     * The objectId of the principal in Azure Active Directory.
     */
    @JsonProperty(value = "principalObjectId")
    private String principalObjectId;

    /*
     * An description of the access policy.
     */
    @JsonProperty(value = "description")
    private String description;

    /*
     * The list of roles the principal is assigned on the environment.
     */
    @JsonProperty(value = "roles")
    private List<AccessPolicyRole> roles;

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

    /**
     * Get the principalObjectId property: The objectId of the principal in Azure Active Directory.
     *
     * @return the principalObjectId value.
     */
    public String principalObjectId() {
        return this.principalObjectId;
    }

    /**
     * Set the principalObjectId property: The objectId of the principal in Azure Active Directory.
     *
     * @param principalObjectId the principalObjectId value to set.
     * @return the AccessPolicyResourceProperties object itself.
     */
    public AccessPolicyResourceProperties withPrincipalObjectId(String principalObjectId) {
        this.principalObjectId = principalObjectId;
        return this;
    }

    /**
     * Get the description property: An description of the access policy.
     *
     * @return the description value.
     */
    public String description() {
        return this.description;
    }

    /**
     * Set the description property: An description of the access policy.
     *
     * @param description the description value to set.
     * @return the AccessPolicyResourceProperties object itself.
     */
    public AccessPolicyResourceProperties withDescription(String description) {
        this.description = description;
        return this;
    }

    /**
     * Get the roles property: The list of roles the principal is assigned on the environment.
     *
     * @return the roles value.
     */
    public List<AccessPolicyRole> roles() {
        return this.roles;
    }

    /**
     * Set the roles property: The list of roles the principal is assigned on the environment.
     *
     * @param roles the roles value to set.
     * @return the AccessPolicyResourceProperties object itself.
     */
    public AccessPolicyResourceProperties withRoles(List<AccessPolicyRole> roles) {
        this.roles = roles;
        return this;
    }

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