// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.lighthouse.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class DefinitionAuthorization {
    /**
     * @return The set of role definition ids which define all the permissions that the principal id can assign.
     * 
     */
    private @Nullable List<String> delegatedRoleDefinitionIds;
    /**
     * @return The display name of the security group/service principal/user that would be assigned permissions to the projected subscription.
     * 
     */
    private @Nullable String principalDisplayName;
    /**
     * @return Principal ID of the security group/service principal/user that would be assigned permissions to the projected subscription.
     * 
     */
    private String principalId;
    /**
     * @return The role definition identifier. This role will define the permissions that are granted to the principal. This cannot be an `Owner` role.
     * 
     */
    private String roleDefinitionId;

    private DefinitionAuthorization() {}
    /**
     * @return The set of role definition ids which define all the permissions that the principal id can assign.
     * 
     */
    public List<String> delegatedRoleDefinitionIds() {
        return this.delegatedRoleDefinitionIds == null ? List.of() : this.delegatedRoleDefinitionIds;
    }
    /**
     * @return The display name of the security group/service principal/user that would be assigned permissions to the projected subscription.
     * 
     */
    public Optional<String> principalDisplayName() {
        return Optional.ofNullable(this.principalDisplayName);
    }
    /**
     * @return Principal ID of the security group/service principal/user that would be assigned permissions to the projected subscription.
     * 
     */
    public String principalId() {
        return this.principalId;
    }
    /**
     * @return The role definition identifier. This role will define the permissions that are granted to the principal. This cannot be an `Owner` role.
     * 
     */
    public String roleDefinitionId() {
        return this.roleDefinitionId;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(DefinitionAuthorization defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<String> delegatedRoleDefinitionIds;
        private @Nullable String principalDisplayName;
        private String principalId;
        private String roleDefinitionId;
        public Builder() {}
        public Builder(DefinitionAuthorization defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.delegatedRoleDefinitionIds = defaults.delegatedRoleDefinitionIds;
    	      this.principalDisplayName = defaults.principalDisplayName;
    	      this.principalId = defaults.principalId;
    	      this.roleDefinitionId = defaults.roleDefinitionId;
        }

        @CustomType.Setter
        public Builder delegatedRoleDefinitionIds(@Nullable List<String> delegatedRoleDefinitionIds) {
            this.delegatedRoleDefinitionIds = delegatedRoleDefinitionIds;
            return this;
        }
        public Builder delegatedRoleDefinitionIds(String... delegatedRoleDefinitionIds) {
            return delegatedRoleDefinitionIds(List.of(delegatedRoleDefinitionIds));
        }
        @CustomType.Setter
        public Builder principalDisplayName(@Nullable String principalDisplayName) {
            this.principalDisplayName = principalDisplayName;
            return this;
        }
        @CustomType.Setter
        public Builder principalId(String principalId) {
            this.principalId = Objects.requireNonNull(principalId);
            return this;
        }
        @CustomType.Setter
        public Builder roleDefinitionId(String roleDefinitionId) {
            this.roleDefinitionId = Objects.requireNonNull(roleDefinitionId);
            return this;
        }
        public DefinitionAuthorization build() {
            final var o = new DefinitionAuthorization();
            o.delegatedRoleDefinitionIds = delegatedRoleDefinitionIds;
            o.principalDisplayName = principalDisplayName;
            o.principalId = principalId;
            o.roleDefinitionId = roleDefinitionId;
            return o;
        }
    }
}
