Class: Google::Apis::ChatV1::GoogleChatV1Section
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::GoogleChatV1Section
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/chat_v1/classes.rb,
lib/google/apis/chat_v1/representations.rb,
lib/google/apis/chat_v1/representations.rb
Overview
Represents a section in
Google Chat. Sections help users organize their spaces. There are two types of
sections: 1. 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_name modified. Examples include: * users/
user/sections/default-direct-messages * users/user/sections/default-
spaces * users/user/sections/default-apps 2. Custom Sections: These
are sections created and managed by the user. Creating a custom section using
CreateSection requires a display_name. Custom sections can be updated
using UpdateSection and deleted using DeleteSection.
Instance Attribute Summary collapse
-
#display_name ⇒ String
Optional.
-
#name ⇒ String
Identifier.
-
#sort_order ⇒ Fixnum
Output only.
-
#type ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleChatV1Section
constructor
A new instance of GoogleChatV1Section.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleChatV1Section
Returns a new instance of GoogleChatV1Section.
4416 4417 4418 |
# File 'lib/google/apis/chat_v1/classes.rb', line 4416 def initialize(**args) update!(**args) end |
Instance Attribute Details
#display_name ⇒ String
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.
Corresponds to the JSON property displayName
4394 4395 4396 |
# File 'lib/google/apis/chat_v1/classes.rb', line 4394 def display_name @display_name end |
#name ⇒ String
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-apps Format: users/
user/sections/section`
Corresponds to the JSON propertyname`
4403 4404 4405 |
# File 'lib/google/apis/chat_v1/classes.rb', line 4403 def name @name end |
#sort_order ⇒ Fixnum
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.
Corresponds to the JSON property sortOrder
4409 4410 4411 |
# File 'lib/google/apis/chat_v1/classes.rb', line 4409 def sort_order @sort_order end |
#type ⇒ String
Required. The type of the section.
Corresponds to the JSON property type
4414 4415 4416 |
# File 'lib/google/apis/chat_v1/classes.rb', line 4414 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4421 4422 4423 4424 4425 4426 |
# File 'lib/google/apis/chat_v1/classes.rb', line 4421 def update!(**args) @display_name = args[:display_name] if args.key?(:display_name) @name = args[:name] if args.key?(:name) @sort_order = args[:sort_order] if args.key?(:sort_order) @type = args[:type] if args.key?(:type) end |