Class CreateSpaceRequest.Builder (0.63.0)

public static final class CreateSpaceRequest.Builder extends GeneratedMessage.Builder<CreateSpaceRequest.Builder> implements CreateSpaceRequestOrBuilder

A request to create a named space with no members.

Protobuf type google.chat.v1.CreateSpaceRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public CreateSpaceRequest build()
Returns
Type Description
CreateSpaceRequest

buildPartial()

public CreateSpaceRequest buildPartial()
Returns
Type Description
CreateSpaceRequest

clear()

public CreateSpaceRequest.Builder clear()
Returns
Type Description
CreateSpaceRequest.Builder
Overrides

clearRequestId()

public CreateSpaceRequest.Builder clearRequestId()

Optional. A unique ID for this request. A random UUID is recommended. Specifying a request ID makes the request idempotent, which ensures that multiple identical requests with the same request ID result in only a single space being created. Subsequent requests with the same request ID return the existing space and do not update the space, even if the requested details differ from the current state.

To use this field effectively:

  • Ensure that subsequent requests are identical and use the same authentication credentials as the original request.
  • If a space was already created with the provided request ID, the request returns that space. Note that the returned space might not be fully populated; the API echoes the space in your request with the system-assigned resource name populated. To retrieve the latest metadata for the space, call GetSpace.
  • Reusing an existing request ID with a different authenticated user results in an error.

string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CreateSpaceRequest.Builder

This builder for chaining.

clearSpace()

public CreateSpaceRequest.Builder clearSpace()

Required. The displayName and spaceType fields must be populated. Only SpaceType.SPACE and SpaceType.GROUP_CHAT are supported. SpaceType.GROUP_CHAT can only be used if importMode is set to true.

If you receive the error message ALREADY_EXISTS, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

The space name is assigned on the server so anything specified in this field will be ignored.

.google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreateSpaceRequest.Builder

getDefaultInstanceForType()

public CreateSpaceRequest getDefaultInstanceForType()
Returns
Type Description
CreateSpaceRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getRequestId()

public String getRequestId()

Optional. A unique ID for this request. A random UUID is recommended. Specifying a request ID makes the request idempotent, which ensures that multiple identical requests with the same request ID result in only a single space being created. Subsequent requests with the same request ID return the existing space and do not update the space, even if the requested details differ from the current state.

To use this field effectively:

  • Ensure that subsequent requests are identical and use the same authentication credentials as the original request.
  • If a space was already created with the provided request ID, the request returns that space. Note that the returned space might not be fully populated; the API echoes the space in your request with the system-assigned resource name populated. To retrieve the latest metadata for the space, call GetSpace.
  • Reusing an existing request ID with a different authenticated user results in an error.

string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The requestId.

getRequestIdBytes()

public ByteString getRequestIdBytes()

Optional. A unique ID for this request. A random UUID is recommended. Specifying a request ID makes the request idempotent, which ensures that multiple identical requests with the same request ID result in only a single space being created. Subsequent requests with the same request ID return the existing space and do not update the space, even if the requested details differ from the current state.

To use this field effectively:

  • Ensure that subsequent requests are identical and use the same authentication credentials as the original request.
  • If a space was already created with the provided request ID, the request returns that space. Note that the returned space might not be fully populated; the API echoes the space in your request with the system-assigned resource name populated. To retrieve the latest metadata for the space, call GetSpace.
  • Reusing an existing request ID with a different authenticated user results in an error.

string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for requestId.

getSpace()

public Space getSpace()

Required. The displayName and spaceType fields must be populated. Only SpaceType.SPACE and SpaceType.GROUP_CHAT are supported. SpaceType.GROUP_CHAT can only be used if importMode is set to true.

If you receive the error message ALREADY_EXISTS, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

The space name is assigned on the server so anything specified in this field will be ignored.

.google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Space

The space.

getSpaceBuilder()

public Space.Builder getSpaceBuilder()

Required. The displayName and spaceType fields must be populated. Only SpaceType.SPACE and SpaceType.GROUP_CHAT are supported. SpaceType.GROUP_CHAT can only be used if importMode is set to true.

If you receive the error message ALREADY_EXISTS, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

The space name is assigned on the server so anything specified in this field will be ignored.

.google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Space.Builder

getSpaceOrBuilder()

public SpaceOrBuilder getSpaceOrBuilder()

Required. The displayName and spaceType fields must be populated. Only SpaceType.SPACE and SpaceType.GROUP_CHAT are supported. SpaceType.GROUP_CHAT can only be used if importMode is set to true.

If you receive the error message ALREADY_EXISTS, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

The space name is assigned on the server so anything specified in this field will be ignored.

.google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SpaceOrBuilder

hasSpace()

public boolean hasSpace()

Required. The displayName and spaceType fields must be populated. Only SpaceType.SPACE and SpaceType.GROUP_CHAT are supported. SpaceType.GROUP_CHAT can only be used if importMode is set to true.

If you receive the error message ALREADY_EXISTS, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

The space name is assigned on the server so anything specified in this field will be ignored.

.google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the space field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CreateSpaceRequest other)

public CreateSpaceRequest.Builder mergeFrom(CreateSpaceRequest other)
Parameter
Name Description
other CreateSpaceRequest
Returns
Type Description
CreateSpaceRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CreateSpaceRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreateSpaceRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CreateSpaceRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CreateSpaceRequest.Builder
Overrides

mergeSpace(Space value)

public CreateSpaceRequest.Builder mergeSpace(Space value)

Required. The displayName and spaceType fields must be populated. Only SpaceType.SPACE and SpaceType.GROUP_CHAT are supported. SpaceType.GROUP_CHAT can only be used if importMode is set to true.

If you receive the error message ALREADY_EXISTS, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

The space name is assigned on the server so anything specified in this field will be ignored.

.google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Space
Returns
Type Description
CreateSpaceRequest.Builder

setRequestId(String value)

public CreateSpaceRequest.Builder setRequestId(String value)

Optional. A unique ID for this request. A random UUID is recommended. Specifying a request ID makes the request idempotent, which ensures that multiple identical requests with the same request ID result in only a single space being created. Subsequent requests with the same request ID return the existing space and do not update the space, even if the requested details differ from the current state.

To use this field effectively:

  • Ensure that subsequent requests are identical and use the same authentication credentials as the original request.
  • If a space was already created with the provided request ID, the request returns that space. Note that the returned space might not be fully populated; the API echoes the space in your request with the system-assigned resource name populated. To retrieve the latest metadata for the space, call GetSpace.
  • Reusing an existing request ID with a different authenticated user results in an error.

string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The requestId to set.

Returns
Type Description
CreateSpaceRequest.Builder

This builder for chaining.

setRequestIdBytes(ByteString value)

public CreateSpaceRequest.Builder setRequestIdBytes(ByteString value)

Optional. A unique ID for this request. A random UUID is recommended. Specifying a request ID makes the request idempotent, which ensures that multiple identical requests with the same request ID result in only a single space being created. Subsequent requests with the same request ID return the existing space and do not update the space, even if the requested details differ from the current state.

To use this field effectively:

  • Ensure that subsequent requests are identical and use the same authentication credentials as the original request.
  • If a space was already created with the provided request ID, the request returns that space. Note that the returned space might not be fully populated; the API echoes the space in your request with the system-assigned resource name populated. To retrieve the latest metadata for the space, call GetSpace.
  • Reusing an existing request ID with a different authenticated user results in an error.

string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for requestId to set.

Returns
Type Description
CreateSpaceRequest.Builder

This builder for chaining.

setSpace(Space value)

public CreateSpaceRequest.Builder setSpace(Space value)

Required. The displayName and spaceType fields must be populated. Only SpaceType.SPACE and SpaceType.GROUP_CHAT are supported. SpaceType.GROUP_CHAT can only be used if importMode is set to true.

If you receive the error message ALREADY_EXISTS, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

The space name is assigned on the server so anything specified in this field will be ignored.

.google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Space
Returns
Type Description
CreateSpaceRequest.Builder

setSpace(Space.Builder builderForValue)

public CreateSpaceRequest.Builder setSpace(Space.Builder builderForValue)

Required. The displayName and spaceType fields must be populated. Only SpaceType.SPACE and SpaceType.GROUP_CHAT are supported. SpaceType.GROUP_CHAT can only be used if importMode is set to true.

If you receive the error message ALREADY_EXISTS, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

The space name is assigned on the server so anything specified in this field will be ignored.

.google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Space.Builder
Returns
Type Description
CreateSpaceRequest.Builder