
com.pulumi.azurenative.documentdb.outputs.GetSqlResourceSqlRoleDefinitionResult 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.azurenative.documentdb.outputs;
import com.pulumi.azurenative.documentdb.outputs.PermissionResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class GetSqlResourceSqlRoleDefinitionResult {
/**
* @return A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist.
*
*/
private @Nullable List assignableScopes;
/**
* @return The unique resource identifier of the database account.
*
*/
private String id;
/**
* @return The name of the database account.
*
*/
private String name;
/**
* @return The set of operations allowed through this Role Definition.
*
*/
private @Nullable List permissions;
/**
* @return A user-friendly name for the Role Definition. Must be unique for the database account.
*
*/
private @Nullable String roleName;
/**
* @return The type of Azure resource.
*
*/
private String type;
private GetSqlResourceSqlRoleDefinitionResult() {}
/**
* @return A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist.
*
*/
public List assignableScopes() {
return this.assignableScopes == null ? List.of() : this.assignableScopes;
}
/**
* @return The unique resource identifier of the database account.
*
*/
public String id() {
return this.id;
}
/**
* @return The name of the database account.
*
*/
public String name() {
return this.name;
}
/**
* @return The set of operations allowed through this Role Definition.
*
*/
public List permissions() {
return this.permissions == null ? List.of() : this.permissions;
}
/**
* @return A user-friendly name for the Role Definition. Must be unique for the database account.
*
*/
public Optional roleName() {
return Optional.ofNullable(this.roleName);
}
/**
* @return The type of Azure resource.
*
*/
public String type() {
return this.type;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(GetSqlResourceSqlRoleDefinitionResult defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable List assignableScopes;
private String id;
private String name;
private @Nullable List permissions;
private @Nullable String roleName;
private String type;
public Builder() {}
public Builder(GetSqlResourceSqlRoleDefinitionResult defaults) {
Objects.requireNonNull(defaults);
this.assignableScopes = defaults.assignableScopes;
this.id = defaults.id;
this.name = defaults.name;
this.permissions = defaults.permissions;
this.roleName = defaults.roleName;
this.type = defaults.type;
}
@CustomType.Setter
public Builder assignableScopes(@Nullable List assignableScopes) {
this.assignableScopes = assignableScopes;
return this;
}
public Builder assignableScopes(String... assignableScopes) {
return assignableScopes(List.of(assignableScopes));
}
@CustomType.Setter
public Builder id(String id) {
if (id == null) {
throw new MissingRequiredPropertyException("GetSqlResourceSqlRoleDefinitionResult", "id");
}
this.id = id;
return this;
}
@CustomType.Setter
public Builder name(String name) {
if (name == null) {
throw new MissingRequiredPropertyException("GetSqlResourceSqlRoleDefinitionResult", "name");
}
this.name = name;
return this;
}
@CustomType.Setter
public Builder permissions(@Nullable List permissions) {
this.permissions = permissions;
return this;
}
public Builder permissions(PermissionResponse... permissions) {
return permissions(List.of(permissions));
}
@CustomType.Setter
public Builder roleName(@Nullable String roleName) {
this.roleName = roleName;
return this;
}
@CustomType.Setter
public Builder type(String type) {
if (type == null) {
throw new MissingRequiredPropertyException("GetSqlResourceSqlRoleDefinitionResult", "type");
}
this.type = type;
return this;
}
public GetSqlResourceSqlRoleDefinitionResult build() {
final var _resultValue = new GetSqlResourceSqlRoleDefinitionResult();
_resultValue.assignableScopes = assignableScopes;
_resultValue.id = id;
_resultValue.name = name;
_resultValue.permissions = permissions;
_resultValue.roleName = roleName;
_resultValue.type = type;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy