RoleAssignmentDetails.java

// 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 response details. */
@Fluent
public final class RoleAssignmentDetails {
    /*
     * Role Assignment ID
     */
    @JsonProperty(value = "id")
    private String id;

    /*
     * Role ID of the Synapse Built-In Role
     */
    @JsonProperty(value = "roleDefinitionId")
    private UUID roleDefinitionId;

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

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

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

    /**
     * Get the id property: Role Assignment ID.
     *
     * @return the id value.
     */
    public String getId() {
        return this.id;
    }

    /**
     * Set the id property: Role Assignment ID.
     *
     * @param id the id value to set.
     * @return the RoleAssignmentDetails object itself.
     */
    public RoleAssignmentDetails setId(String id) {
        this.id = id;
        return this;
    }

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

    /**
     * Set the roleDefinitionId property: Role ID of the Synapse Built-In Role.
     *
     * @param roleDefinitionId the roleDefinitionId value to set.
     * @return the RoleAssignmentDetails object itself.
     */
    public RoleAssignmentDetails setRoleDefinitionId(UUID roleDefinitionId) {
        this.roleDefinitionId = roleDefinitionId;
        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 RoleAssignmentDetails object itself.
     */
    public RoleAssignmentDetails setPrincipalId(UUID principalId) {
        this.principalId = principalId;
        return this;
    }

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

    /**
     * Set the scope property: Scope at the role assignment is created.
     *
     * @param scope the scope value to set.
     * @return the RoleAssignmentDetails object itself.
     */
    public RoleAssignmentDetails 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 RoleAssignmentDetails object itself.
     */
    public RoleAssignmentDetails setPrincipalType(String principalType) {
        this.principalType = principalType;
        return this;
    }
}