Class: XTwitterScraper::Models::Support::TicketRetrieveResponse::Message

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/x_twitter_scraper/models/support/ticket_retrieve_response.rb,
sig/x_twitter_scraper/models/support/ticket_retrieve_response.rbs

Defined Under Namespace

Classes: Attachment

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(created_at: nil, messages: nil, public_id: nil, status: nil, subject: nil, updated_at: nil) ⇒ Object

Parameters:



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# File 'lib/x_twitter_scraper/models/support/ticket_retrieve_response.rb', line 51

class Message < XTwitterScraper::Internal::Type::BaseModel
  # @!attribute attachments
  #
  #   @return [Array<XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment>, nil]
  optional :attachments,
           -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment] }

  # @!attribute body
  #
  #   @return [String, nil]
  optional :body, String

  # @!attribute created_at
  #
  #   @return [Time, nil]
  optional :created_at, Time, api_name: :createdAt

  # @!attribute sender
  #
  #   @return [String, nil]
  optional :sender, String

  # @!method initialize(attachments: nil, body: nil, created_at: nil, sender: nil)
  #   @param attachments [Array<XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment>]
  #   @param body [String]
  #   @param created_at [Time]
  #   @param sender [String]

  class Attachment < XTwitterScraper::Internal::Type::BaseModel
    # @!attribute content_type
    #   Validated media type.
    #
    #   @return [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType]
    required :content_type,
             enum: -> { XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType },
             api_name: :contentType

    # @!attribute filename
    #
    #   @return [String]
    required :filename, String

    # @!attribute kind
    #   Attachment media class.
    #
    #   @return [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Kind]
    required :kind,
             enum: -> { XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Kind }

    # @!attribute public_id
    #
    #   @return [String]
    required :public_id, String, api_name: :publicId

    # @!attribute size_bytes
    #
    #   @return [Integer]
    required :size_bytes, Integer, api_name: :sizeBytes

    # @!attribute status
    #   Storage processing state.
    #
    #   @return [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Status]
    required :status,
             enum: -> { XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Status }

    # @!attribute url
    #
    #   @return [String]
    required :url, String

    # @!method initialize(content_type:, filename:, kind:, public_id:, size_bytes:, status:, url:)
    #   Downloadable image or video attached to a support message.
    #
    #   @param content_type [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType] Validated media type.
    #
    #   @param filename [String]
    #
    #   @param kind [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Kind] Attachment media class.
    #
    #   @param public_id [String]
    #
    #   @param size_bytes [Integer]
    #
    #   @param status [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Status] Storage processing state.
    #
    #   @param url [String]

    # Validated media type.
    #
    # @see XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment#content_type
    module ContentType
      extend XTwitterScraper::Internal::Type::Enum

      IMAGE_JPEG = :"image/jpeg"
      IMAGE_PNG = :"image/png"
      IMAGE_GIF = :"image/gif"
      IMAGE_WEBP = :"image/webp"
      VIDEO_MP4 = :"video/mp4"
      VIDEO_QUICKTIME = :"video/quicktime"
      VIDEO_WEBM = :"video/webm"

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

    # Attachment media class.
    #
    # @see XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment#kind
    module Kind
      extend XTwitterScraper::Internal::Type::Enum

      IMAGE = :image
      VIDEO = :video

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

    # Storage processing state.
    #
    # @see XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment#status
    module Status
      extend XTwitterScraper::Internal::Type::Enum

      PENDING = :pending
      READY = :ready
      FAILED = :failed

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

Instance Attribute Details

#attachmentsArray<XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment>?



55
56
# File 'lib/x_twitter_scraper/models/support/ticket_retrieve_response.rb', line 55

optional :attachments,
-> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment] }

#bodyString?

Parameters:

  • (String)

Returns:

  • (String, nil)


61
# File 'lib/x_twitter_scraper/models/support/ticket_retrieve_response.rb', line 61

optional :body, String

#created_atTime?

Parameters:

  • (Time)

Returns:

  • (Time, nil)


66
# File 'lib/x_twitter_scraper/models/support/ticket_retrieve_response.rb', line 66

optional :created_at, Time, api_name: :createdAt

#senderString?

Parameters:

  • (String)

Returns:

  • (String, nil)


71
# File 'lib/x_twitter_scraper/models/support/ticket_retrieve_response.rb', line 71

optional :sender, String

Instance Method Details

#to_hash{

Returns:

  • ({)


97
# File 'sig/x_twitter_scraper/models/support/ticket_retrieve_response.rbs', line 97

def to_hash: -> {