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

package com.azure.analytics.synapse.accesscontrol.models;

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

/** Role Assignment request details. */
@Fluent
public final class RoleAssignmentRequest {
    /*
     * Role ID of the Synapse Built-In Role
     */
    @JsonProperty(value = "roleId", required = true)
    private UUID roleId;

    /*
     * Object ID of the AAD principal or security-group
     */
    @JsonProperty(value = "principalId", required = true)
    private UUID principalId;

    /*
     * Scope at which the role assignment is created
     */
    @JsonProperty(value = "scope", required = true)
    private String scope;

    /*
     * Type of the principal Id: User, Group or ServicePrincipal
     */
    @JsonProperty(value = "principalType")
    private String principalType;

    /**
     * Get the roleId property: Role ID of the Synapse Built-In Role.
     *
     * @return the roleId value.
     */
    public UUID getRoleId() {
        return this.roleId;
    }

    /**
     * Set the roleId property: Role ID of the Synapse Built-In Role.
     *
     * @param roleId the roleId value to set.
     * @return the RoleAssignmentRequest object itself.
     */
    public RoleAssignmentRequest setRoleId(UUID roleId) {
        this.roleId = roleId;
        return this;
    }

    /**
     * Get the principalId property: Object ID of the AAD principal or security-group.
     *
     * @return the principalId value.
     */
    public UUID getPrincipalId() {
        return this.principalId;
    }

    /**
     * Set the principalId property: Object ID of the AAD principal or security-group.
     *
     * @param principalId the principalId value to set.
     * @return the RoleAssignmentRequest object itself.
     */
    public RoleAssignmentRequest setPrincipalId(UUID principalId) {
        this.principalId = principalId;
        return this;
    }

    /**
     * Get the scope property: Scope at which the role assignment is created.
     *
     * @return the scope value.
     */
    public String getScope() {
        return this.scope;
    }

    /**
     * Set the scope property: Scope at which the role assignment is created.
     *
     * @param scope the scope value to set.
     * @return the RoleAssignmentRequest object itself.
     */
    public RoleAssignmentRequest setScope(String scope) {
        this.scope = scope;
        return this;
    }

    /**
     * Get the principalType property: Type of the principal Id: User, Group or ServicePrincipal.
     *
     * @return the principalType value.
     */
    public String getPrincipalType() {
        return this.principalType;
    }

    /**
     * Set the principalType property: Type of the principal Id: User, Group or ServicePrincipal.
     *
     * @param principalType the principalType value to set.
     * @return the RoleAssignmentRequest object itself.
     */
    public RoleAssignmentRequest setPrincipalType(String principalType) {
        this.principalType = principalType;
        return this;
    }
}
