Class ListMessagesRequest.Builder (0.3.0)

public static final class ListMessagesRequest.Builder extends GeneratedMessageV3.Builder<ListMessagesRequest.Builder> implements ListMessagesRequestOrBuilder

Lists messages in the specified space, that the user is a member of.

Protobuf type google.chat.v1.ListMessagesRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ListMessagesRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ListMessagesRequest.Builder
Overrides

build()

public ListMessagesRequest build()
Returns
TypeDescription
ListMessagesRequest

buildPartial()

public ListMessagesRequest buildPartial()
Returns
TypeDescription
ListMessagesRequest

clear()

public ListMessagesRequest.Builder clear()
Returns
TypeDescription
ListMessagesRequest.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ListMessagesRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ListMessagesRequest.Builder
Overrides

clearFilter()

public ListMessagesRequest.Builder clearFilter()

A query filter.

You can filter messages by date (create_time) and thread (thread.name).

To filter messages by the date they were created, specify the create_time with a timestamp in RFC-3339 format and double quotation marks. For example, "2023-04-21T11:30:00-04:00". You can use the greater than operator > to list messages that were created after a timestamp, or the less than operator < to list messages that were created before a timestamp. To filter messages within a time interval, use the AND operator between two timestamps.

To filter by thread, specify the thread.name, formatted as spaces/{space}/threads/{thread}. You can only specify one thread.name per query.

To filter by both thread and date, use the AND operator in your query.

For example, the following queries are valid:

` create_time > "2012-04-21T11:30:00-04:00"

create_time > "2012-04-21T11:30:00-04:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123

create_time > "2012-04-21T11:30:00+00:00" AND

create_time < "2013-01-01T00:00:00+00:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123

thread.name = spaces/AAAAAAAAAAA/threads/123

Invalid queries are rejected by the server with an INVALID_ARGUMENT` error.

string filter = 4;

Returns
TypeDescription
ListMessagesRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ListMessagesRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ListMessagesRequest.Builder
Overrides

clearOrderBy()

public ListMessagesRequest.Builder clearOrderBy()

Optional, if resuming from a previous query.

How the list of messages is ordered. Specify a value to order by an ordering operation. Valid ordering operation values are as follows:

  • ASC for ascending.

  • DESC for descending.

    The default ordering is create_time ASC.

string order_by = 5;

Returns
TypeDescription
ListMessagesRequest.Builder

This builder for chaining.

clearPageSize()

public ListMessagesRequest.Builder clearPageSize()

The maximum number of messages returned. The service might return fewer messages than this value.

If unspecified, at most 25 are returned.

The maximum value is 1,000. If you use a value more than 1,000, it's automatically changed to 1,000.

Negative values return an INVALID_ARGUMENT error.

int32 page_size = 2;

Returns
TypeDescription
ListMessagesRequest.Builder

This builder for chaining.

clearPageToken()

public ListMessagesRequest.Builder clearPageToken()

Optional, if resuming from a previous query.

A page token received from a previous list messages call. Provide this parameter to retrieve the subsequent page.

When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.

string page_token = 3;

Returns
TypeDescription
ListMessagesRequest.Builder

This builder for chaining.

clearParent()

public ListMessagesRequest.Builder clearParent()

Required. The resource name of the space to list messages from.

Format: spaces/{space}

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ListMessagesRequest.Builder

This builder for chaining.

clearShowDeleted()

public ListMessagesRequest.Builder clearShowDeleted()

Whether to include deleted messages. Deleted messages include deleted time and metadata about their deletion, but message content is unavailable.

bool show_deleted = 6;

Returns
TypeDescription
ListMessagesRequest.Builder

This builder for chaining.

clone()

public ListMessagesRequest.Builder clone()
Returns
TypeDescription
ListMessagesRequest.Builder
Overrides

getDefaultInstanceForType()

public ListMessagesRequest getDefaultInstanceForType()
Returns
TypeDescription
ListMessagesRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFilter()

public String getFilter()

A query filter.

You can filter messages by date (create_time) and thread (thread.name).

To filter messages by the date they were created, specify the create_time with a timestamp in RFC-3339 format and double quotation marks. For example, "2023-04-21T11:30:00-04:00". You can use the greater than operator > to list messages that were created after a timestamp, or the less than operator < to list messages that were created before a timestamp. To filter messages within a time interval, use the AND operator between two timestamps.

To filter by thread, specify the thread.name, formatted as spaces/{space}/threads/{thread}. You can only specify one thread.name per query.

To filter by both thread and date, use the AND operator in your query.

For example, the following queries are valid:

` create_time > "2012-04-21T11:30:00-04:00"

create_time > "2012-04-21T11:30:00-04:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123

create_time > "2012-04-21T11:30:00+00:00" AND

create_time < "2013-01-01T00:00:00+00:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123

thread.name = spaces/AAAAAAAAAAA/threads/123

Invalid queries are rejected by the server with an INVALID_ARGUMENT` error.

string filter = 4;

Returns
TypeDescription
String

The filter.

getFilterBytes()

public ByteString getFilterBytes()

A query filter.

You can filter messages by date (create_time) and thread (thread.name).

To filter messages by the date they were created, specify the create_time with a timestamp in RFC-3339 format and double quotation marks. For example, "2023-04-21T11:30:00-04:00". You can use the greater than operator > to list messages that were created after a timestamp, or the less than operator < to list messages that were created before a timestamp. To filter messages within a time interval, use the AND operator between two timestamps.

To filter by thread, specify the thread.name, formatted as spaces/{space}/threads/{thread}. You can only specify one thread.name per query.

To filter by both thread and date, use the AND operator in your query.

For example, the following queries are valid:

` create_time > "2012-04-21T11:30:00-04:00"

create_time > "2012-04-21T11:30:00-04:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123

create_time > "2012-04-21T11:30:00+00:00" AND

create_time < "2013-01-01T00:00:00+00:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123

thread.name = spaces/AAAAAAAAAAA/threads/123

Invalid queries are rejected by the server with an INVALID_ARGUMENT` error.

string filter = 4;

Returns
TypeDescription
ByteString

The bytes for filter.

getOrderBy()

public String getOrderBy()

Optional, if resuming from a previous query.

How the list of messages is ordered. Specify a value to order by an ordering operation. Valid ordering operation values are as follows:

  • ASC for ascending.

  • DESC for descending.

    The default ordering is create_time ASC.

string order_by = 5;

Returns
TypeDescription
String

The orderBy.

getOrderByBytes()

public ByteString getOrderByBytes()

Optional, if resuming from a previous query.

How the list of messages is ordered. Specify a value to order by an ordering operation. Valid ordering operation values are as follows:

  • ASC for ascending.

  • DESC for descending.

    The default ordering is create_time ASC.

string order_by = 5;

Returns
TypeDescription
ByteString

The bytes for orderBy.

getPageSize()

public int getPageSize()

The maximum number of messages returned. The service might return fewer messages than this value.

If unspecified, at most 25 are returned.

The maximum value is 1,000. If you use a value more than 1,000, it's automatically changed to 1,000.

Negative values return an INVALID_ARGUMENT error.

int32 page_size = 2;

Returns
TypeDescription
int

The pageSize.

getPageToken()

public String getPageToken()

Optional, if resuming from a previous query.

A page token received from a previous list messages call. Provide this parameter to retrieve the subsequent page.

When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.

string page_token = 3;

Returns
TypeDescription
String

The pageToken.

getPageTokenBytes()

public ByteString getPageTokenBytes()

Optional, if resuming from a previous query.

A page token received from a previous list messages call. Provide this parameter to retrieve the subsequent page.

When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.

string page_token = 3;

Returns
TypeDescription
ByteString

The bytes for pageToken.

getParent()

public String getParent()

Required. The resource name of the space to list messages from.

Format: spaces/{space}

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. The resource name of the space to list messages from.

Format: spaces/{space}

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for parent.

getShowDeleted()

public boolean getShowDeleted()

Whether to include deleted messages. Deleted messages include deleted time and metadata about their deletion, but message content is unavailable.

bool show_deleted = 6;

Returns
TypeDescription
boolean

The showDeleted.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ListMessagesRequest other)

public ListMessagesRequest.Builder mergeFrom(ListMessagesRequest other)
Parameter
NameDescription
otherListMessagesRequest
Returns
TypeDescription
ListMessagesRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ListMessagesRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ListMessagesRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ListMessagesRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ListMessagesRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ListMessagesRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ListMessagesRequest.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public ListMessagesRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ListMessagesRequest.Builder
Overrides

setFilter(String value)

public ListMessagesRequest.Builder setFilter(String value)

A query filter.

You can filter messages by date (create_time) and thread (thread.name).

To filter messages by the date they were created, specify the create_time with a timestamp in RFC-3339 format and double quotation marks. For example, "2023-04-21T11:30:00-04:00". You can use the greater than operator > to list messages that were created after a timestamp, or the less than operator < to list messages that were created before a timestamp. To filter messages within a time interval, use the AND operator between two timestamps.

To filter by thread, specify the thread.name, formatted as spaces/{space}/threads/{thread}. You can only specify one thread.name per query.

To filter by both thread and date, use the AND operator in your query.

For example, the following queries are valid:

` create_time > "2012-04-21T11:30:00-04:00"

create_time > "2012-04-21T11:30:00-04:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123

create_time > "2012-04-21T11:30:00+00:00" AND

create_time < "2013-01-01T00:00:00+00:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123

thread.name = spaces/AAAAAAAAAAA/threads/123

Invalid queries are rejected by the server with an INVALID_ARGUMENT` error.

string filter = 4;

Parameter
NameDescription
valueString

The filter to set.

Returns
TypeDescription
ListMessagesRequest.Builder

This builder for chaining.

setFilterBytes(ByteString value)

public ListMessagesRequest.Builder setFilterBytes(ByteString value)

A query filter.

You can filter messages by date (create_time) and thread (thread.name).

To filter messages by the date they were created, specify the create_time with a timestamp in RFC-3339 format and double quotation marks. For example, "2023-04-21T11:30:00-04:00". You can use the greater than operator > to list messages that were created after a timestamp, or the less than operator < to list messages that were created before a timestamp. To filter messages within a time interval, use the AND operator between two timestamps.

To filter by thread, specify the thread.name, formatted as spaces/{space}/threads/{thread}. You can only specify one thread.name per query.

To filter by both thread and date, use the AND operator in your query.

For example, the following queries are valid:

` create_time > "2012-04-21T11:30:00-04:00"

create_time > "2012-04-21T11:30:00-04:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123

create_time > "2012-04-21T11:30:00+00:00" AND

create_time < "2013-01-01T00:00:00+00:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123

thread.name = spaces/AAAAAAAAAAA/threads/123

Invalid queries are rejected by the server with an INVALID_ARGUMENT` error.

string filter = 4;

Parameter
NameDescription
valueByteString

The bytes for filter to set.

Returns
TypeDescription
ListMessagesRequest.Builder

This builder for chaining.

setOrderBy(String value)

public ListMessagesRequest.Builder setOrderBy(String value)

Optional, if resuming from a previous query.

How the list of messages is ordered. Specify a value to order by an ordering operation. Valid ordering operation values are as follows:

  • ASC for ascending.

  • DESC for descending.

    The default ordering is create_time ASC.

string order_by = 5;

Parameter
NameDescription
valueString

The orderBy to set.

Returns
TypeDescription
ListMessagesRequest.Builder

This builder for chaining.

setOrderByBytes(ByteString value)

public ListMessagesRequest.Builder setOrderByBytes(ByteString value)

Optional, if resuming from a previous query.

How the list of messages is ordered. Specify a value to order by an ordering operation. Valid ordering operation values are as follows:

  • ASC for ascending.

  • DESC for descending.

    The default ordering is create_time ASC.

string order_by = 5;

Parameter
NameDescription
valueByteString

The bytes for orderBy to set.

Returns
TypeDescription
ListMessagesRequest.Builder

This builder for chaining.

setPageSize(int value)

public ListMessagesRequest.Builder setPageSize(int value)

The maximum number of messages returned. The service might return fewer messages than this value.

If unspecified, at most 25 are returned.

The maximum value is 1,000. If you use a value more than 1,000, it's automatically changed to 1,000.

Negative values return an INVALID_ARGUMENT error.

int32 page_size = 2;

Parameter
NameDescription
valueint

The pageSize to set.

Returns
TypeDescription
ListMessagesRequest.Builder

This builder for chaining.

setPageToken(String value)

public ListMessagesRequest.Builder setPageToken(String value)

Optional, if resuming from a previous query.

A page token received from a previous list messages call. Provide this parameter to retrieve the subsequent page.

When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.

string page_token = 3;

Parameter
NameDescription
valueString

The pageToken to set.

Returns
TypeDescription
ListMessagesRequest.Builder

This builder for chaining.

setPageTokenBytes(ByteString value)

public ListMessagesRequest.Builder setPageTokenBytes(ByteString value)

Optional, if resuming from a previous query.

A page token received from a previous list messages call. Provide this parameter to retrieve the subsequent page.

When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.

string page_token = 3;

Parameter
NameDescription
valueByteString

The bytes for pageToken to set.

Returns
TypeDescription
ListMessagesRequest.Builder

This builder for chaining.

setParent(String value)

public ListMessagesRequest.Builder setParent(String value)

Required. The resource name of the space to list messages from.

Format: spaces/{space}

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The parent to set.

Returns
TypeDescription
ListMessagesRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public ListMessagesRequest.Builder setParentBytes(ByteString value)

Required. The resource name of the space to list messages from.

Format: spaces/{space}

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for parent to set.

Returns
TypeDescription
ListMessagesRequest.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ListMessagesRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ListMessagesRequest.Builder
Overrides

setShowDeleted(boolean value)

public ListMessagesRequest.Builder setShowDeleted(boolean value)

Whether to include deleted messages. Deleted messages include deleted time and metadata about their deletion, but message content is unavailable.

bool show_deleted = 6;

Parameter
NameDescription
valueboolean

The showDeleted to set.

Returns
TypeDescription
ListMessagesRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ListMessagesRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ListMessagesRequest.Builder
Overrides