All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azuread.outputs.ApplicationAppRole Maven / Gradle / Ivy

// *** 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.azuread.outputs;

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

@CustomType
public final class ApplicationAppRole {
    /**
     * @return Specifies whether this app role definition can be assigned to users and groups by setting to `User`, or to other applications (that are accessing this application in a standalone scenario) by setting to `Application`, or to both.
     * 
     */
    private List allowedMemberTypes;
    /**
     * @return Description of the app role that appears when the role is being assigned and, if the role functions as an application permissions, during the consent experiences.
     * 
     */
    private String description;
    /**
     * @return Display name for the app role that appears during app role assignment and in consent experiences.
     * 
     */
    private String displayName;
    /**
     * @return Determines if the app role is enabled. Defaults to `true`.
     * 
     */
    private @Nullable Boolean enabled;
    /**
     * @return The unique identifier of the app role. Must be a valid UUID.
     * 
     * > **Tip: Generating a UUID for the `id` field** To generate a value for the `id` field in cases where the actual UUID is not important, you can use the `random_uuid` resource. See the application example in the provider repository.
     * 
     */
    private String id;
    /**
     * @return The value that is used for the `roles` claim in ID tokens and OAuth 2.0 access tokens that are authenticating an assigned service or user principal
     * 
     */
    private @Nullable String value;

    private ApplicationAppRole() {}
    /**
     * @return Specifies whether this app role definition can be assigned to users and groups by setting to `User`, or to other applications (that are accessing this application in a standalone scenario) by setting to `Application`, or to both.
     * 
     */
    public List allowedMemberTypes() {
        return this.allowedMemberTypes;
    }
    /**
     * @return Description of the app role that appears when the role is being assigned and, if the role functions as an application permissions, during the consent experiences.
     * 
     */
    public String description() {
        return this.description;
    }
    /**
     * @return Display name for the app role that appears during app role assignment and in consent experiences.
     * 
     */
    public String displayName() {
        return this.displayName;
    }
    /**
     * @return Determines if the app role is enabled. Defaults to `true`.
     * 
     */
    public Optional enabled() {
        return Optional.ofNullable(this.enabled);
    }
    /**
     * @return The unique identifier of the app role. Must be a valid UUID.
     * 
     * > **Tip: Generating a UUID for the `id` field** To generate a value for the `id` field in cases where the actual UUID is not important, you can use the `random_uuid` resource. See the application example in the provider repository.
     * 
     */
    public String id() {
        return this.id;
    }
    /**
     * @return The value that is used for the `roles` claim in ID tokens and OAuth 2.0 access tokens that are authenticating an assigned service or user principal
     * 
     */
    public Optional value() {
        return Optional.ofNullable(this.value);
    }

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

    public static Builder builder(ApplicationAppRole defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private List allowedMemberTypes;
        private String description;
        private String displayName;
        private @Nullable Boolean enabled;
        private String id;
        private @Nullable String value;
        public Builder() {}
        public Builder(ApplicationAppRole defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.allowedMemberTypes = defaults.allowedMemberTypes;
    	      this.description = defaults.description;
    	      this.displayName = defaults.displayName;
    	      this.enabled = defaults.enabled;
    	      this.id = defaults.id;
    	      this.value = defaults.value;
        }

        @CustomType.Setter
        public Builder allowedMemberTypes(List allowedMemberTypes) {
            if (allowedMemberTypes == null) {
              throw new MissingRequiredPropertyException("ApplicationAppRole", "allowedMemberTypes");
            }
            this.allowedMemberTypes = allowedMemberTypes;
            return this;
        }
        public Builder allowedMemberTypes(String... allowedMemberTypes) {
            return allowedMemberTypes(List.of(allowedMemberTypes));
        }
        @CustomType.Setter
        public Builder description(String description) {
            if (description == null) {
              throw new MissingRequiredPropertyException("ApplicationAppRole", "description");
            }
            this.description = description;
            return this;
        }
        @CustomType.Setter
        public Builder displayName(String displayName) {
            if (displayName == null) {
              throw new MissingRequiredPropertyException("ApplicationAppRole", "displayName");
            }
            this.displayName = displayName;
            return this;
        }
        @CustomType.Setter
        public Builder enabled(@Nullable Boolean enabled) {

            this.enabled = enabled;
            return this;
        }
        @CustomType.Setter
        public Builder id(String id) {
            if (id == null) {
              throw new MissingRequiredPropertyException("ApplicationAppRole", "id");
            }
            this.id = id;
            return this;
        }
        @CustomType.Setter
        public Builder value(@Nullable String value) {

            this.value = value;
            return this;
        }
        public ApplicationAppRole build() {
            final var _resultValue = new ApplicationAppRole();
            _resultValue.allowedMemberTypes = allowedMemberTypes;
            _resultValue.description = description;
            _resultValue.displayName = displayName;
            _resultValue.enabled = enabled;
            _resultValue.id = id;
            _resultValue.value = value;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy