Class: Knockapi::Models::MessageGetContentResponse::Data::MessageChatContent::Template::Block

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/knockapi/models/message_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:



283
284
285
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
# File 'lib/knockapi/models/message_get_content_response.rb', line 283

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::MessageGetContentResponse::Data::MessageChatContent::Template::Block::Type]
  required :type,
           enum: -> { Knockapi::Models::MessageGetContentResponse::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::MessageGetContentResponse::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::MessageGetContentResponse::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)


288
# File 'lib/knockapi/models/message_get_content_response.rb', line 288

required :content, String

#nameString

The name of the block for identification.

Returns:

  • (String)


294
# File 'lib/knockapi/models/message_get_content_response.rb', line 294

required :name, String

#typeSymbol, Knockapi::Models::MessageGetContentResponse::Data::MessageChatContent::Template::Block::Type

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



300
301
# File 'lib/knockapi/models/message_get_content_response.rb', line 300

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