Class Role.Builder
-
- All Implemented Interfaces:
public final class Role.BuilderA builder for Role.
-
-
Method Summary
Modifier and Type Method Description final Role.Builderid(String id)Identifier for the role. final Role.Builderid(JsonField<String> id)Sets Builder.id to an arbitrary JSON value. final Role.Builderdescription(String description)Optional description of the role. final Role.Builderdescription(Optional<String> description)Alias for calling Builder.description with description.orElse(null).final Role.Builderdescription(JsonField<String> description)Sets Builder.description to an arbitrary JSON value. final Role.Buildername(String name)Unique name for the role. final Role.Buildername(JsonField<String> name)Sets Builder.name to an arbitrary JSON value. final Role.Builderobject_(JsonValue object_)Sets the field to an arbitrary JSON value. final Role.Builderpermissions(List<String> permissions)Permissions granted by the role. final Role.Builderpermissions(JsonField<List<String>> permissions)Sets Builder.permissions to an arbitrary JSON value. final Role.BuilderaddPermission(String permission)Adds a single String to permissions. final Role.BuilderpredefinedRole(Boolean predefinedRole)Whether the role is predefined and managed by OpenAI. final Role.BuilderpredefinedRole(JsonField<Boolean> predefinedRole)Sets Builder.predefinedRole to an arbitrary JSON value. final Role.BuilderresourceType(String resourceType)Resource type the role is bound to (for example api.organizationorapi.project).final Role.BuilderresourceType(JsonField<String> resourceType)Sets Builder.resourceType to an arbitrary JSON value. final Role.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final Role.BuilderputAdditionalProperty(String key, JsonValue value)final Role.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final Role.BuilderremoveAdditionalProperty(String key)final Role.BuilderremoveAllAdditionalProperties(Set<String> keys)final Rolebuild()Returns an immutable instance of Role. -
-
Method Detail
-
id
final Role.Builder id(String id)
Identifier for the role.
-
id
final Role.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
description
final Role.Builder description(String description)
Optional description of the role.
-
description
final Role.Builder description(Optional<String> description)
Alias for calling Builder.description with
description.orElse(null).
-
description
final Role.Builder description(JsonField<String> description)
Sets Builder.description to an arbitrary JSON value.
You should usually call Builder.description with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
name
final Role.Builder name(String name)
Unique name for the role.
-
name
final Role.Builder name(JsonField<String> name)
Sets Builder.name to an arbitrary JSON value.
You should usually call Builder.name with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
object_
final Role.Builder object_(JsonValue object_)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("role")This method is primarily for setting the field to an undocumented or not yet supported value.
-
permissions
final Role.Builder permissions(List<String> permissions)
Permissions granted by the role.
-
permissions
final Role.Builder permissions(JsonField<List<String>> permissions)
Sets Builder.permissions to an arbitrary JSON value.
You should usually call Builder.permissions with a well-typed
List<String>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addPermission
final Role.Builder addPermission(String permission)
Adds a single String to permissions.
-
predefinedRole
final Role.Builder predefinedRole(Boolean predefinedRole)
Whether the role is predefined and managed by OpenAI.
-
predefinedRole
final Role.Builder predefinedRole(JsonField<Boolean> predefinedRole)
Sets Builder.predefinedRole to an arbitrary JSON value.
You should usually call Builder.predefinedRole with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
resourceType
final Role.Builder resourceType(String resourceType)
Resource type the role is bound to (for example
api.organizationorapi.project).
-
resourceType
final Role.Builder resourceType(JsonField<String> resourceType)
Sets Builder.resourceType to an arbitrary JSON value.
You should usually call Builder.resourceType with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final Role.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final Role.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final Role.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final Role.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final Role.Builder removeAllAdditionalProperties(Set<String> keys)
-
-
-
-