public
final
class
Section
extends
GeneratedMessage
implements
SectionOrBuilder
Represents 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-messages -
users/{user}/sections/default-spaces -
users/{user}/sections/default-apps -
Custom Sections:These are sections created and managed by the user. Creating a custom section using
CreateSectionrequiresadisplay_name. Custom sections can be updated usingUpdateSectionand deleted usingDeleteSection.
Protobuf type google.chat.v1.Section
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessage > SectionImplements
SectionOrBuilderStatic Fields
DISPLAY_NAME_FIELD_NUMBER
public
static
final
int
DISPLAY_NAME_FIELD_NUMBER
NAME_FIELD_NUMBER
public
static
final
int
NAME_FIELD_NUMBER
SORT_ORDER_FIELD_NUMBER
public
static
final
int
SORT_ORDER_FIELD_NUMBER
TYPE_FIELD_NUMBER
public
static
final
int
TYPE_FIELD_NUMBER
Static Methods
getDefaultInstance()
public
static
Section
getDefaultInstance
()
getDescriptor()
public
static
final
Descriptors
.
Descriptor
getDescriptor
()
newBuilder()
public
static
Section
.
Builder
newBuilder
()
newBuilder(Section prototype)
public
static
Section
.
Builder
newBuilder
(
Section
prototype
)
parseDelimitedFrom(InputStream input)
public
static
Section
parseDelimitedFrom
(
InputStream
input
)
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Section
parseDelimitedFrom
(
InputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(byte[] data)
public
static
Section
parseFrom
(
byte
[]
data
)
data
byte
[]
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public
static
Section
parseFrom
(
byte
[]
data
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(ByteString data)
public
static
Section
parseFrom
(
ByteString
data
)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public
static
Section
parseFrom
(
ByteString
data
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(CodedInputStream input)
public
static
Section
parseFrom
(
CodedInputStream
input
)
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Section
parseFrom
(
CodedInputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(InputStream input)
public
static
Section
parseFrom
(
InputStream
input
)
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Section
parseFrom
(
InputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(ByteBuffer data)
public
static
Section
parseFrom
(
ByteBuffer
data
)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public
static
Section
parseFrom
(
ByteBuffer
data
,
ExtensionRegistryLite
extensionRegistry
)
parser()
public
static
Parser<Section>
parser
()
Methods
equals(Object obj)
public
boolean
equals
(
Object
obj
)
getDefaultInstanceForType()
public
Section
getDefaultInstanceForType
()
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];
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];
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];
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];
getParserForType()
public
Parser<Section>
getParserForType
()
getSerializedSize()
public
int
getSerializedSize
()
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;
getType()
public
Section
.
SectionType
getType
()
Required. The type of the section.
.google.chat.v1.Section.SectionType type = 4 [(.google.api.field_behavior) = REQUIRED];
getTypeValue()
public
int
getTypeValue
()
Required. The type of the section.
.google.chat.v1.Section.SectionType type = 4 [(.google.api.field_behavior) = REQUIRED];
hashCode()
public
int
hashCode
()
internalGetFieldAccessorTable()
protected
GeneratedMessage
.
FieldAccessorTable
internalGetFieldAccessorTable
()
isInitialized()
public
final
boolean
isInitialized
()
newBuilderForType()
public
Section
.
Builder
newBuilderForType
()
newBuilderForType(AbstractMessage.BuilderParent parent)
protected
Section
.
Builder
newBuilderForType
(
AbstractMessage
.
BuilderParent
parent
)
toBuilder()
public
Section
.
Builder
toBuilder
()
writeTo(CodedOutputStream output)
public
void
writeTo
(
CodedOutputStream
output
)

