Class: Rixl::Models::Post

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/post.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new Post and sets the default values.



61
62
63
# File 'lib/models/post.rb', line 61

def initialize()
    @additional_data = Hash.new
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a post

Raises:

  • (StandardError)


84
85
86
87
# File 'lib/models/post.rb', line 84

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return Post.new
end

Instance Method Details

#additional_dataObject

Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



46
47
48
# File 'lib/models/post.rb', line 46

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the AdditionalData property.

Returns:

  • a void



54
55
56
# File 'lib/models/post.rb', line 54

def additional_data=(value)
    @additional_data = value
end

#created_atObject

Gets the created_at property value. The created_at property

Returns:

  • a string



68
69
70
# File 'lib/models/post.rb', line 68

def created_at
    return @created_at
end

#created_at=(value) ⇒ Object

Sets the created_at property value. The created_at property

Parameters:

  • value

    Value to set for the created_at property.

Returns:

  • a void



76
77
78
# File 'lib/models/post.rb', line 76

def created_at=(value)
    @created_at = value
end

#creator_idObject

Gets the creator_id property value. The creator_id property

Returns:

  • a string



92
93
94
# File 'lib/models/post.rb', line 92

def creator_id
    return @creator_id
end

#creator_id=(value) ⇒ Object

Sets the creator_id property value. The creator_id property

Parameters:

  • value

    Value to set for the creator_id property.

Returns:

  • a void



100
101
102
# File 'lib/models/post.rb', line 100

def creator_id=(value)
    @creator_id = value
end

#descriptionObject

Gets the description property value. The description property

Returns:

  • a string



107
108
109
# File 'lib/models/post.rb', line 107

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. The description property

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



115
116
117
# File 'lib/models/post.rb', line 115

def description=(value)
    @description = value
end

#feed_idObject

Gets the feed_id property value. The feed_id property

Returns:

  • a string



122
123
124
# File 'lib/models/post.rb', line 122

def feed_id
    return @feed_id
end

#feed_id=(value) ⇒ Object

Sets the feed_id property value. The feed_id property

Parameters:

  • value

    Value to set for the feed_id property.

Returns:

  • a void



130
131
132
# File 'lib/models/post.rb', line 130

def feed_id=(value)
    @feed_id = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/models/post.rb', line 137

def get_field_deserializers()
    return {
        "created_at" => lambda {|n| @created_at = n.get_string_value() },
        "creator_id" => lambda {|n| @creator_id = n.get_string_value() },
        "description" => lambda {|n| @description = n.get_string_value() },
        "feed_id" => lambda {|n| @feed_id = n.get_string_value() },
        "id" => lambda {|n| @id = n.get_string_value() },
        "image" => lambda {|n| @image = n.get_object_value(lambda {|pn| Rixl::Models::Image.create_from_discriminator_value(pn) }) },
        "plan_type" => lambda {|n| @plan_type = n.get_enum_value(Rixl::Models::Github_com_rixlhq_api_db_sqlcPlanType) },
        "type" => lambda {|n| @type = n.get_enum_value(Rixl::Models::PostType) },
        "updated_at" => lambda {|n| @updated_at = n.get_string_value() },
        "video" => lambda {|n| @video = n.get_object_value(lambda {|pn| Rixl::Models::Github_com_rixlhq_api_internal_videosVideoResponse.create_from_discriminator_value(pn) }) },
    }
end

#idObject

Gets the id property value. The id property

Returns:

  • a string



155
156
157
# File 'lib/models/post.rb', line 155

def id
    return @id
end

#id=(value) ⇒ Object

Sets the id property value. The id property

Parameters:

  • value

    Value to set for the id property.

Returns:

  • a void



163
164
165
# File 'lib/models/post.rb', line 163

def id=(value)
    @id = value
end

#imageObject

Gets the image property value. The image property

Returns:

  • a image



170
171
172
# File 'lib/models/post.rb', line 170

def image
    return @image
end

#image=(value) ⇒ Object

Sets the image property value. The image property

Parameters:

  • value

    Value to set for the image property.

Returns:

  • a void



178
179
180
# File 'lib/models/post.rb', line 178

def image=(value)
    @image = value
end

#plan_typeObject

Gets the plan_type property value. The plan_type property

Returns:

  • a github_com_rixlhq_api_db_sqlc_plan_type



185
186
187
# File 'lib/models/post.rb', line 185

def plan_type
    return @plan_type
end

#plan_type=(value) ⇒ Object

Sets the plan_type property value. The plan_type property

Parameters:

  • value

    Value to set for the plan_type property.

Returns:

  • a void



193
194
195
# File 'lib/models/post.rb', line 193

def plan_type=(value)
    @plan_type = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/models/post.rb', line 201

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("created_at", @created_at)
    writer.write_string_value("creator_id", @creator_id)
    writer.write_string_value("description", @description)
    writer.write_string_value("feed_id", @feed_id)
    writer.write_string_value("id", @id)
    writer.write_object_value("image", @image)
    writer.write_enum_value("plan_type", @plan_type)
    writer.write_enum_value("type", @type)
    writer.write_string_value("updated_at", @updated_at)
    writer.write_object_value("video", @video)
    writer.write_additional_data(@additional_data)
end

#typeObject

Gets the type property value. The type property

Returns:

  • a post_type



219
220
221
# File 'lib/models/post.rb', line 219

def type
    return @type
end

#type=(value) ⇒ Object

Sets the type property value. The type property

Parameters:

  • value

    Value to set for the type property.

Returns:

  • a void



227
228
229
# File 'lib/models/post.rb', line 227

def type=(value)
    @type = value
end

#updated_atObject

Gets the updated_at property value. The updated_at property

Returns:

  • a string



234
235
236
# File 'lib/models/post.rb', line 234

def updated_at
    return @updated_at
end

#updated_at=(value) ⇒ Object

Sets the updated_at property value. The updated_at property

Parameters:

  • value

    Value to set for the updated_at property.

Returns:

  • a void



242
243
244
# File 'lib/models/post.rb', line 242

def updated_at=(value)
    @updated_at = value
end

#videoObject

Gets the video property value. The video property

Returns:

  • a github_com_rixlhq_api_internal_videos_video_response



249
250
251
# File 'lib/models/post.rb', line 249

def video
    return @video
end

#video=(value) ⇒ Object

Sets the video property value. The video property

Parameters:

  • value

    Value to set for the video property.

Returns:

  • a void



257
258
259
# File 'lib/models/post.rb', line 257

def video=(value)
    @video = value
end