Class: Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent::Template::Block

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/knockapi/models/messages/batch_get_content_response.rb

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(content:, name:, type:) ⇒ Object

A block in a message in a chat.

Parameters:



286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
# File 'lib/knockapi/models/messages/batch_get_content_response.rb', line 286

class Block < Knockapi::Internal::Type::BaseModel
  # @!attribute content
  #   The actual content of the block.
  #
  #   @return [String]
  required :content, String

  # @!attribute name
  #   The name of the block for identification.
  #
  #   @return [String]
  required :name, String

  # @!attribute type
  #   The type of block in a message in a chat (text or markdown).
  #
  #   @return [Symbol, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent::Template::Block::Type]
  required :type,
           enum: -> { Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent::Template::Block::Type }

  # @!method initialize(content:, name:, type:)
  #   A block in a message in a chat.
  #
  #   @param content [String] The actual content of the block.
  #
  #   @param name [String] The name of the block for identification.
  #
  #   @param type [Symbol, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent::Template::Block::Type] The type of block in a message in a chat (text or markdown).

  # The type of block in a message in a chat (text or markdown).
  #
  # @see Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent::Template::Block#type
  module Type
    extend Knockapi::Internal::Type::Enum

    TEXT = :text
    MARKDOWN = :markdown

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#contentString

The actual content of the block.

Returns:

  • (String)


291
# File 'lib/knockapi/models/messages/batch_get_content_response.rb', line 291

required :content, String

#nameString

The name of the block for identification.

Returns:

  • (String)


297
# File 'lib/knockapi/models/messages/batch_get_content_response.rb', line 297

required :name, String

#typeSymbol, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent::Template::Block::Type

The type of block in a message in a chat (text or markdown).



303
304
# File 'lib/knockapi/models/messages/batch_get_content_response.rb', line 303

required :type,
enum: -> { Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent::Template::Block::Type }