public static final class Section.Builder extends GeneratedMessage.Builder<Section.Builder> implements SectionOrBuilderRepresents a section in Google Chat. Sections help users organize their spaces. There are two types of sections:
- System Sections: These are predefined sections managed by Google
Chat.
Their resource names are fixed, and they cannot be created, deleted, or
have their
display_namemodified. Examples include: users/{user}/sections/default-direct-messagesusers/{user}/sections/default-spacesusers/{user}/sections/default-appsCustom Sections: These are sections created and managed by the user. Creating a custom section using
CreateSectionrequires adisplay_name. Custom sections can be updated usingUpdateSectionand deleted usingDeleteSection.
Protobuf type google.chat.v1.Section
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > Section.BuilderImplements
SectionOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public Section build()| Returns | |
|---|---|
| Type | Description |
Section |
|
buildPartial()
public Section buildPartial()| Returns | |
|---|---|
| Type | Description |
Section |
|
clear()
public Section.Builder clear()| Returns | |
|---|---|
| Type | Description |
Section.Builder |
|
clearDisplayName()
public Section.Builder clearDisplayName() Optional. The section's display name. Only populated for sections of type
CUSTOM_SECTION. Supports up to 80 characters. Required when creating a
CUSTOM_SECTION.
string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Section.Builder |
This builder for chaining. |
clearName()
public Section.Builder clearName()Identifier. Resource name of the section.
For system sections, the section ID is a constant string:
- DEFAULT_DIRECT_MESSAGES:
users/{user}/sections/default-direct-messages - DEFAULT_SPACES:
users/{user}/sections/default-spaces DEFAULT_APPS:
users/{user}/sections/default-appsFormat:
users/{user}/sections/{section}
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
| Returns | |
|---|---|
| Type | Description |
Section.Builder |
This builder for chaining. |
clearSortOrder()
public Section.Builder clearSortOrder() Output only. The order of the section in relation to other sections.
Sections with a lower sort_order value appear before sections with a
higher value.
int32 sort_order = 3;
| Returns | |
|---|---|
| Type | Description |
Section.Builder |
This builder for chaining. |
clearType()
public Section.Builder clearType()Required. The type of the section.
.google.chat.v1.Section.SectionType type = 4 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Section.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public Section getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Section |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getDisplayName()
public String getDisplayName() Optional. The section's display name. Only populated for sections of type
CUSTOM_SECTION. Supports up to 80 characters. Required when creating a
CUSTOM_SECTION.
string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The displayName. |
getDisplayNameBytes()
public ByteString getDisplayNameBytes() Optional. The section's display name. Only populated for sections of type
CUSTOM_SECTION. Supports up to 80 characters. Required when creating a
CUSTOM_SECTION.
string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for displayName. |
getName()
public String getName()Identifier. Resource name of the section.
For system sections, the section ID is a constant string:
- DEFAULT_DIRECT_MESSAGES:
users/{user}/sections/default-direct-messages - DEFAULT_SPACES:
users/{user}/sections/default-spaces DEFAULT_APPS:
users/{user}/sections/default-appsFormat:
users/{user}/sections/{section}
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
| Returns | |
|---|---|
| Type | Description |
String |
The name. |
getNameBytes()
public ByteString getNameBytes()Identifier. Resource name of the section.
For system sections, the section ID is a constant string:
- DEFAULT_DIRECT_MESSAGES:
users/{user}/sections/default-direct-messages - DEFAULT_SPACES:
users/{user}/sections/default-spaces DEFAULT_APPS:
users/{user}/sections/default-appsFormat:
users/{user}/sections/{section}
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for name. |
getSortOrder()
public int getSortOrder() Output only. The order of the section in relation to other sections.
Sections with a lower sort_order value appear before sections with a
higher value.
int32 sort_order = 3;
| Returns | |
|---|---|
| Type | Description |
int |
The sortOrder. |
getType()
public Section.SectionType getType()Required. The type of the section.
.google.chat.v1.Section.SectionType type = 4 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Section.SectionType |
The type. |
getTypeValue()
public int getTypeValue()Required. The type of the section.
.google.chat.v1.Section.SectionType type = 4 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for type. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(Section other)
public Section.Builder mergeFrom(Section other)| Parameter | |
|---|---|
| Name | Description |
other |
Section |
| Returns | |
|---|---|
| Type | Description |
Section.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Section.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Section.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Section.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Section.Builder |
|
setDisplayName(String value)
public Section.Builder setDisplayName(String value) Optional. The section's display name. Only populated for sections of type
CUSTOM_SECTION. Supports up to 80 characters. Required when creating a
CUSTOM_SECTION.
string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe displayName to set. |
| Returns | |
|---|---|
| Type | Description |
Section.Builder |
This builder for chaining. |
setDisplayNameBytes(ByteString value)
public Section.Builder setDisplayNameBytes(ByteString value) Optional. The section's display name. Only populated for sections of type
CUSTOM_SECTION. Supports up to 80 characters. Required when creating a
CUSTOM_SECTION.
string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for displayName to set. |
| Returns | |
|---|---|
| Type | Description |
Section.Builder |
This builder for chaining. |
setName(String value)
public Section.Builder setName(String value)Identifier. Resource name of the section.
For system sections, the section ID is a constant string:
- DEFAULT_DIRECT_MESSAGES:
users/{user}/sections/default-direct-messages - DEFAULT_SPACES:
users/{user}/sections/default-spaces DEFAULT_APPS:
users/{user}/sections/default-appsFormat:
users/{user}/sections/{section}
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe name to set. |
| Returns | |
|---|---|
| Type | Description |
Section.Builder |
This builder for chaining. |
setNameBytes(ByteString value)
public Section.Builder setNameBytes(ByteString value)Identifier. Resource name of the section.
For system sections, the section ID is a constant string:
- DEFAULT_DIRECT_MESSAGES:
users/{user}/sections/default-direct-messages - DEFAULT_SPACES:
users/{user}/sections/default-spaces DEFAULT_APPS:
users/{user}/sections/default-appsFormat:
users/{user}/sections/{section}
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for name to set. |
| Returns | |
|---|---|
| Type | Description |
Section.Builder |
This builder for chaining. |
setSortOrder(int value)
public Section.Builder setSortOrder(int value) Output only. The order of the section in relation to other sections.
Sections with a lower sort_order value appear before sections with a
higher value.
int32 sort_order = 3;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe sortOrder to set. |
| Returns | |
|---|---|
| Type | Description |
Section.Builder |
This builder for chaining. |
setType(Section.SectionType value)
public Section.Builder setType(Section.SectionType value)Required. The type of the section.
.google.chat.v1.Section.SectionType type = 4 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
Section.SectionTypeThe type to set. |
| Returns | |
|---|---|
| Type | Description |
Section.Builder |
This builder for chaining. |
setTypeValue(int value)
public Section.Builder setTypeValue(int value)Required. The type of the section.
.google.chat.v1.Section.SectionType type = 4 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for type to set. |
| Returns | |
|---|---|
| Type | Description |
Section.Builder |
This builder for chaining. |