Class: GongAPI::ContentSharedEvent
- Inherits:
-
Object
- Object
- GongAPI::ContentSharedEvent
- Defined in:
- lib/gong_api/models/content_shared_event.rb
Overview
Content Shared Event
Instance Attribute Summary collapse
-
#action_name ⇒ Object
The name of the action like "Document Sent" or "Presentation Shared".
-
#content_id ⇒ Object
The id of the content that was shared in the reporting system.
-
#content_properties ⇒ Object
A list of additional properties for the content.
-
#content_title ⇒ Object
Human readable title of the content.
-
#content_url ⇒ Object
The url of the content that was shared in the reporting system.
-
#crm_context ⇒ Object
A list of references to external systems such as CRM, Telephony System, Case Management, etc.
-
#event_id ⇒ Object
The original id of the event as designated in the reporting system.
-
#event_properties ⇒ Object
A list of additional properties for the event.
-
#event_timestamp ⇒ Object
The date and time when the event happened in the ISO-8601 format (e.g., ‘2021-08-01T02:30:00+05:00’ or ‘2021-08-01T08:00:00Z’, where Z stands for UTC);.
-
#recipients ⇒ Object
array of objects with name + email of recipients.
-
#reporting_system ⇒ Object
The unique identifier of the reporting system.
-
#share_id ⇒ Object
The id of the share action, in case there can be more than one share per content.
-
#share_info_url ⇒ Object
The link to a page that presents additional information about this event.
-
#sharer ⇒ Object
Returns the value of attribute sharer.
-
#sharing_message_body ⇒ Object
The share message body.
-
#sharing_message_subject ⇒ Object
The subject of share email / message.
-
#workspace_id ⇒ Object
Optional workspace identifier.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ContentSharedEvent
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ ContentSharedEvent
Initializes the object
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 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/gong_api/models/content_shared_event.rb', line 121 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `GongAPI::ContentSharedEvent` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `GongAPI::ContentSharedEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'action_name') self.action_name = attributes[:'action_name'] end if attributes.key?(:'content_id') self.content_id = attributes[:'content_id'] end if attributes.key?(:'content_properties') if (value = attributes[:'content_properties']).is_a?(Array) self.content_properties = value end end if attributes.key?(:'content_title') self.content_title = attributes[:'content_title'] end if attributes.key?(:'content_url') self.content_url = attributes[:'content_url'] end if attributes.key?(:'crm_context') if (value = attributes[:'crm_context']).is_a?(Array) self.crm_context = value end end if attributes.key?(:'event_id') self.event_id = attributes[:'event_id'] end if attributes.key?(:'event_properties') if (value = attributes[:'event_properties']).is_a?(Array) self.event_properties = value end end if attributes.key?(:'event_timestamp') self. = attributes[:'event_timestamp'] end if attributes.key?(:'recipients') if (value = attributes[:'recipients']).is_a?(Array) self.recipients = value end end if attributes.key?(:'reporting_system') self.reporting_system = attributes[:'reporting_system'] end if attributes.key?(:'share_id') self.share_id = attributes[:'share_id'] end if attributes.key?(:'share_info_url') self.share_info_url = attributes[:'share_info_url'] end if attributes.key?(:'sharer') self.sharer = attributes[:'sharer'] end if attributes.key?(:'sharing_message_body') self. = attributes[:'sharing_message_body'] end if attributes.key?(:'sharing_message_subject') self. = attributes[:'sharing_message_subject'] end if attributes.key?(:'workspace_id') self.workspace_id = attributes[:'workspace_id'] end end |
Instance Attribute Details
#action_name ⇒ Object
The name of the action like "Document Sent" or "Presentation Shared".
18 19 20 |
# File 'lib/gong_api/models/content_shared_event.rb', line 18 def action_name @action_name end |
#content_id ⇒ Object
The id of the content that was shared in the reporting system.
21 22 23 |
# File 'lib/gong_api/models/content_shared_event.rb', line 21 def content_id @content_id end |
#content_properties ⇒ Object
A list of additional properties for the content
24 25 26 |
# File 'lib/gong_api/models/content_shared_event.rb', line 24 def content_properties @content_properties end |
#content_title ⇒ Object
Human readable title of the content.
27 28 29 |
# File 'lib/gong_api/models/content_shared_event.rb', line 27 def content_title @content_title end |
#content_url ⇒ Object
The url of the content that was shared in the reporting system. This is the url that is was accessed by the viewer.
30 31 32 |
# File 'lib/gong_api/models/content_shared_event.rb', line 30 def content_url @content_url end |
#crm_context ⇒ Object
A list of references to external systems such as CRM, Telephony System, Case Management, etc.
33 34 35 |
# File 'lib/gong_api/models/content_shared_event.rb', line 33 def crm_context @crm_context end |
#event_id ⇒ Object
The original id of the event as designated in the reporting system.
36 37 38 |
# File 'lib/gong_api/models/content_shared_event.rb', line 36 def event_id @event_id end |
#event_properties ⇒ Object
A list of additional properties for the event
39 40 41 |
# File 'lib/gong_api/models/content_shared_event.rb', line 39 def event_properties @event_properties end |
#event_timestamp ⇒ Object
The date and time when the event happened in the ISO-8601 format (e.g., ‘2021-08-01T02:30:00+05:00’ or ‘2021-08-01T08:00:00Z’, where Z stands for UTC);
42 43 44 |
# File 'lib/gong_api/models/content_shared_event.rb', line 42 def end |
#recipients ⇒ Object
array of objects with name + email of recipients. Email is required.
45 46 47 |
# File 'lib/gong_api/models/content_shared_event.rb', line 45 def recipients @recipients end |
#reporting_system ⇒ Object
The unique identifier of the reporting system. It is the same value in all events originating from the same system.
48 49 50 |
# File 'lib/gong_api/models/content_shared_event.rb', line 48 def reporting_system @reporting_system end |
#share_id ⇒ Object
The id of the share action, in case there can be more than one share per content.
51 52 53 |
# File 'lib/gong_api/models/content_shared_event.rb', line 51 def share_id @share_id end |
#share_info_url ⇒ Object
The link to a page that presents additional information about this event.
54 55 56 |
# File 'lib/gong_api/models/content_shared_event.rb', line 54 def share_info_url @share_info_url end |
#sharer ⇒ Object
Returns the value of attribute sharer.
56 57 58 |
# File 'lib/gong_api/models/content_shared_event.rb', line 56 def sharer @sharer end |
#sharing_message_body ⇒ Object
The share message body. Can contain HTML and will be cleaned when it is presented.
59 60 61 |
# File 'lib/gong_api/models/content_shared_event.rb', line 59 def end |
#sharing_message_subject ⇒ Object
The subject of share email / message.
62 63 64 |
# File 'lib/gong_api/models/content_shared_event.rb', line 62 def end |
#workspace_id ⇒ Object
Optional workspace identifier. If specified, the event will be placed into this workspace, otherwise, the default algorithm for workspace placement will be applied.
65 66 67 |
# File 'lib/gong_api/models/content_shared_event.rb', line 65 def workspace_id @workspace_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/gong_api/models/content_shared_event.rb', line 68 def self.attribute_map { :'action_name' => :'actionName', :'content_id' => :'contentId', :'content_properties' => :'contentProperties', :'content_title' => :'contentTitle', :'content_url' => :'contentUrl', :'crm_context' => :'crmContext', :'event_id' => :'eventId', :'event_properties' => :'eventProperties', :'event_timestamp' => :'eventTimestamp', :'recipients' => :'recipients', :'reporting_system' => :'reportingSystem', :'share_id' => :'shareId', :'share_info_url' => :'shareInfoUrl', :'sharer' => :'sharer', :'sharing_message_body' => :'sharingMessageBody', :'sharing_message_subject' => :'sharingMessageSubject', :'workspace_id' => :'workspaceId' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
288 289 290 |
# File 'lib/gong_api/models/content_shared_event.rb', line 288 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
114 115 116 117 |
# File 'lib/gong_api/models/content_shared_event.rb', line 114 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/gong_api/models/content_shared_event.rb', line 91 def self.openapi_types { :'action_name' => :'Object', :'content_id' => :'Object', :'content_properties' => :'Object', :'content_title' => :'Object', :'content_url' => :'Object', :'crm_context' => :'Object', :'event_id' => :'Object', :'event_properties' => :'Object', :'event_timestamp' => :'Object', :'recipients' => :'Object', :'reporting_system' => :'Object', :'share_id' => :'Object', :'share_info_url' => :'Object', :'sharer' => :'Object', :'sharing_message_body' => :'Object', :'sharing_message_subject' => :'Object', :'workspace_id' => :'Object' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/gong_api/models/content_shared_event.rb', line 251 def ==(o) return true if self.equal?(o) self.class == o.class && action_name == o.action_name && content_id == o.content_id && content_properties == o.content_properties && content_title == o.content_title && content_url == o.content_url && crm_context == o.crm_context && event_id == o.event_id && event_properties == o.event_properties && == o. && recipients == o.recipients && reporting_system == o.reporting_system && share_id == o.share_id && share_info_url == o.share_info_url && sharer == o.sharer && == o. && == o. && workspace_id == o.workspace_id end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 |
# File 'lib/gong_api/models/content_shared_event.rb', line 318 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model GongAPI.const_get(type).build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
387 388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/gong_api/models/content_shared_event.rb', line 387 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 |
# File 'lib/gong_api/models/content_shared_event.rb', line 295 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) end end self end |
#eql?(o) ⇒ Boolean
275 276 277 |
# File 'lib/gong_api/models/content_shared_event.rb', line 275 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
281 282 283 |
# File 'lib/gong_api/models/content_shared_event.rb', line 281 def hash [action_name, content_id, content_properties, content_title, content_url, crm_context, event_id, event_properties, , recipients, reporting_system, share_id, share_info_url, sharer, , , workspace_id].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/gong_api/models/content_shared_event.rb', line 213 def list_invalid_properties invalid_properties = Array.new if @content_id.nil? invalid_properties.push('invalid value for "content_id", content_id cannot be nil.') end if @content_title.nil? invalid_properties.push('invalid value for "content_title", content_title cannot be nil.') end if @content_url.nil? invalid_properties.push('invalid value for "content_url", content_url cannot be nil.') end if .nil? invalid_properties.push('invalid value for "event_timestamp", event_timestamp cannot be nil.') end if @reporting_system.nil? invalid_properties.push('invalid value for "reporting_system", reporting_system cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
363 364 365 |
# File 'lib/gong_api/models/content_shared_event.rb', line 363 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
369 370 371 372 373 374 375 376 377 378 379 380 381 |
# File 'lib/gong_api/models/content_shared_event.rb', line 369 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
357 358 359 |
# File 'lib/gong_api/models/content_shared_event.rb', line 357 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
240 241 242 243 244 245 246 247 |
# File 'lib/gong_api/models/content_shared_event.rb', line 240 def valid? return false if @content_id.nil? return false if @content_title.nil? return false if @content_url.nil? return false if .nil? return false if @reporting_system.nil? true end |