late-sdk 0.0.77 → 0.0.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -1
  3. data/docs/BroadcastsApi.md +7 -6
  4. data/docs/BulkCreateContacts200Response.md +26 -0
  5. data/docs/CommentAutomationsApi.md +28 -24
  6. data/docs/ContactsApi.md +42 -36
  7. data/docs/CreateBroadcast200Response.md +20 -0
  8. data/docs/CreateBroadcast200ResponseBroadcast.md +30 -0
  9. data/docs/CreateCommentAutomation200Response.md +20 -0
  10. data/docs/CreateCommentAutomation200ResponseAutomation.md +38 -0
  11. data/docs/CreateCommentAutomation200ResponseAutomationStats.md +22 -0
  12. data/docs/CreateContact200Response.md +24 -0
  13. data/docs/CreateContact200ResponseChannel.md +24 -0
  14. data/docs/CreateContact200ResponseContact.md +36 -0
  15. data/docs/CreateCustomField200Response.md +20 -0
  16. data/docs/CreateSequence200Response.md +20 -0
  17. data/docs/CreateSequence200ResponseSequence.md +30 -0
  18. data/docs/CustomFieldsApi.md +21 -18
  19. data/docs/GetBroadcast200ResponseBroadcast.md +1 -1
  20. data/docs/GetCommentAutomation200Response.md +22 -0
  21. data/docs/GetCommentAutomation200ResponseAutomation.md +46 -0
  22. data/docs/GetCommentAutomation200ResponseLogsInner.md +32 -0
  23. data/docs/GetContact200Response.md +22 -0
  24. data/docs/GetContact200ResponseChannelsInner.md +32 -0
  25. data/docs/GetContact200ResponseContact.md +42 -0
  26. data/docs/GetContactChannels200Response.md +20 -0
  27. data/docs/GetContactChannels200ResponseChannelsInner.md +34 -0
  28. data/docs/ListCommentAutomationLogs200Response.md +22 -0
  29. data/docs/ListContacts200Response.md +24 -0
  30. data/docs/ListContacts200ResponseContactsInner.md +52 -0
  31. data/docs/{GetBroadcast200ResponseBroadcastSegmentFilters.md → ListContacts200ResponseFilters.md} +2 -2
  32. data/docs/ListCustomFields200Response.md +20 -0
  33. data/docs/ListCustomFields200ResponseFieldsInner.md +28 -0
  34. data/docs/SequencesApi.md +7 -6
  35. data/docs/UpdateCommentAutomation200Response.md +20 -0
  36. data/docs/UpdateCommentAutomation200ResponseAutomation.md +32 -0
  37. data/docs/UpdateContact200Response.md +20 -0
  38. data/docs/UpdateContact200ResponseContact.md +36 -0
  39. data/docs/UpdateCustomField200Response.md +20 -0
  40. data/docs/UpdateCustomField200ResponseField.md +26 -0
  41. data/lib/late-sdk/api/broadcasts_api.rb +5 -5
  42. data/lib/late-sdk/api/comment_automations_api.rb +20 -20
  43. data/lib/late-sdk/api/contacts_api.rb +30 -30
  44. data/lib/late-sdk/api/custom_fields_api.rb +15 -15
  45. data/lib/late-sdk/api/sequences_api.rb +5 -5
  46. data/lib/late-sdk/models/bulk_create_contacts200_response.rb +185 -0
  47. data/lib/late-sdk/models/create_broadcast200_response.rb +156 -0
  48. data/lib/late-sdk/models/create_broadcast200_response_broadcast.rb +201 -0
  49. data/lib/late-sdk/models/create_comment_automation200_response.rb +156 -0
  50. data/lib/late-sdk/models/create_comment_automation200_response_automation.rb +273 -0
  51. data/lib/late-sdk/models/create_comment_automation200_response_automation_stats.rb +165 -0
  52. data/lib/late-sdk/models/create_contact200_response.rb +174 -0
  53. data/lib/late-sdk/models/create_contact200_response_channel.rb +175 -0
  54. data/lib/late-sdk/models/create_contact200_response_contact.rb +230 -0
  55. data/lib/late-sdk/models/create_custom_field200_response.rb +156 -0
  56. data/lib/late-sdk/models/create_sequence200_response.rb +156 -0
  57. data/lib/late-sdk/models/create_sequence200_response_sequence.rb +201 -0
  58. data/lib/late-sdk/models/get_broadcast200_response_broadcast.rb +1 -1
  59. data/lib/late-sdk/models/get_comment_automation200_response.rb +167 -0
  60. data/lib/late-sdk/models/get_comment_automation200_response_automation.rb +309 -0
  61. data/lib/late-sdk/models/get_comment_automation200_response_logs_inner.rb +244 -0
  62. data/lib/late-sdk/models/get_contact200_response.rb +167 -0
  63. data/lib/late-sdk/models/get_contact200_response_channels_inner.rb +210 -0
  64. data/lib/late-sdk/models/get_contact200_response_contact.rb +259 -0
  65. data/lib/late-sdk/models/get_contact_channels200_response.rb +158 -0
  66. data/lib/late-sdk/models/get_contact_channels200_response_channels_inner.rb +219 -0
  67. data/lib/late-sdk/models/list_comment_automation_logs200_response.rb +167 -0
  68. data/lib/late-sdk/models/list_contacts200_response.rb +176 -0
  69. data/lib/late-sdk/models/list_contacts200_response_contacts_inner.rb +302 -0
  70. data/lib/late-sdk/models/{get_broadcast200_response_broadcast_segment_filters.rb → list_contacts200_response_filters.rb} +3 -3
  71. data/lib/late-sdk/models/list_custom_fields200_response.rb +158 -0
  72. data/lib/late-sdk/models/list_custom_fields200_response_fields_inner.rb +228 -0
  73. data/lib/late-sdk/models/update_comment_automation200_response.rb +156 -0
  74. data/lib/late-sdk/models/update_comment_automation200_response_automation.rb +246 -0
  75. data/lib/late-sdk/models/update_contact200_response.rb +156 -0
  76. data/lib/late-sdk/models/update_contact200_response_contact.rb +230 -0
  77. data/lib/late-sdk/models/update_custom_field200_response.rb +156 -0
  78. data/lib/late-sdk/models/update_custom_field200_response_field.rb +185 -0
  79. data/lib/late-sdk/version.rb +1 -1
  80. data/lib/late-sdk.rb +32 -1
  81. data/openapi.yaml +360 -15
  82. data/spec/api/broadcasts_api_spec.rb +1 -1
  83. data/spec/api/comment_automations_api_spec.rb +4 -4
  84. data/spec/api/contacts_api_spec.rb +6 -6
  85. data/spec/api/custom_fields_api_spec.rb +3 -3
  86. data/spec/api/sequences_api_spec.rb +1 -1
  87. data/spec/models/bulk_create_contacts200_response_spec.rb +60 -0
  88. data/spec/models/create_broadcast200_response_broadcast_spec.rb +72 -0
  89. data/spec/models/create_broadcast200_response_spec.rb +42 -0
  90. data/spec/models/create_comment_automation200_response_automation_spec.rb +100 -0
  91. data/spec/models/create_comment_automation200_response_automation_stats_spec.rb +48 -0
  92. data/spec/models/create_comment_automation200_response_spec.rb +42 -0
  93. data/spec/models/create_contact200_response_channel_spec.rb +54 -0
  94. data/spec/models/create_contact200_response_contact_spec.rb +90 -0
  95. data/spec/models/create_contact200_response_spec.rb +54 -0
  96. data/spec/models/create_custom_field200_response_spec.rb +42 -0
  97. data/spec/models/create_sequence200_response_sequence_spec.rb +72 -0
  98. data/spec/models/create_sequence200_response_spec.rb +42 -0
  99. data/spec/models/get_comment_automation200_response_automation_spec.rb +124 -0
  100. data/spec/models/get_comment_automation200_response_logs_inner_spec.rb +82 -0
  101. data/spec/models/get_comment_automation200_response_spec.rb +48 -0
  102. data/spec/models/get_contact200_response_channels_inner_spec.rb +78 -0
  103. data/spec/models/get_contact200_response_contact_spec.rb +108 -0
  104. data/spec/models/get_contact200_response_spec.rb +48 -0
  105. data/spec/models/get_contact_channels200_response_channels_inner_spec.rb +84 -0
  106. data/spec/models/get_contact_channels200_response_spec.rb +42 -0
  107. data/spec/models/list_comment_automation_logs200_response_spec.rb +48 -0
  108. data/spec/models/list_contacts200_response_contacts_inner_spec.rb +138 -0
  109. data/spec/models/{get_broadcast200_response_broadcast_segment_filters_spec.rb → list_contacts200_response_filters_spec.rb} +6 -6
  110. data/spec/models/list_contacts200_response_spec.rb +54 -0
  111. data/spec/models/list_custom_fields200_response_fields_inner_spec.rb +70 -0
  112. data/spec/models/list_custom_fields200_response_spec.rb +42 -0
  113. data/spec/models/update_comment_automation200_response_automation_spec.rb +82 -0
  114. data/spec/models/update_comment_automation200_response_spec.rb +42 -0
  115. data/spec/models/update_contact200_response_contact_spec.rb +90 -0
  116. data/spec/models/update_contact200_response_spec.rb +42 -0
  117. data/spec/models/update_custom_field200_response_field_spec.rb +60 -0
  118. data/spec/models/update_custom_field200_response_spec.rb +42 -0
  119. data/zernio-sdk-0.0.79.gem +0 -0
  120. metadata +130 -6
  121. data/zernio-sdk-0.0.77.gem +0 -0
@@ -0,0 +1,201 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class CreateBroadcast200ResponseBroadcast < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :description
23
+
24
+ attr_accessor :platform
25
+
26
+ attr_accessor :account_id
27
+
28
+ attr_accessor :status
29
+
30
+ attr_accessor :created_at
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'id' => :'id',
36
+ :'name' => :'name',
37
+ :'description' => :'description',
38
+ :'platform' => :'platform',
39
+ :'account_id' => :'accountId',
40
+ :'status' => :'status',
41
+ :'created_at' => :'createdAt'
42
+ }
43
+ end
44
+
45
+ # Returns attribute mapping this model knows about
46
+ def self.acceptable_attribute_map
47
+ attribute_map
48
+ end
49
+
50
+ # Returns all the JSON keys this model knows about
51
+ def self.acceptable_attributes
52
+ acceptable_attribute_map.values
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.openapi_types
57
+ {
58
+ :'id' => :'String',
59
+ :'name' => :'String',
60
+ :'description' => :'String',
61
+ :'platform' => :'String',
62
+ :'account_id' => :'String',
63
+ :'status' => :'String',
64
+ :'created_at' => :'Time'
65
+ }
66
+ end
67
+
68
+ # List of attributes with nullable: true
69
+ def self.openapi_nullable
70
+ Set.new([
71
+ ])
72
+ end
73
+
74
+ # Initializes the object
75
+ # @param [Hash] attributes Model attributes in the form of hash
76
+ def initialize(attributes = {})
77
+ if (!attributes.is_a?(Hash))
78
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::CreateBroadcast200ResponseBroadcast` initialize method"
79
+ end
80
+
81
+ # check to see if the attribute exists and convert string to symbol for hash key
82
+ acceptable_attribute_map = self.class.acceptable_attribute_map
83
+ attributes = attributes.each_with_object({}) { |(k, v), h|
84
+ if (!acceptable_attribute_map.key?(k.to_sym))
85
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::CreateBroadcast200ResponseBroadcast`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
86
+ end
87
+ h[k.to_sym] = v
88
+ }
89
+
90
+ if attributes.key?(:'id')
91
+ self.id = attributes[:'id']
92
+ end
93
+
94
+ if attributes.key?(:'name')
95
+ self.name = attributes[:'name']
96
+ end
97
+
98
+ if attributes.key?(:'description')
99
+ self.description = attributes[:'description']
100
+ end
101
+
102
+ if attributes.key?(:'platform')
103
+ self.platform = attributes[:'platform']
104
+ end
105
+
106
+ if attributes.key?(:'account_id')
107
+ self.account_id = attributes[:'account_id']
108
+ end
109
+
110
+ if attributes.key?(:'status')
111
+ self.status = attributes[:'status']
112
+ end
113
+
114
+ if attributes.key?(:'created_at')
115
+ self.created_at = attributes[:'created_at']
116
+ end
117
+ end
118
+
119
+ # Show invalid properties with the reasons. Usually used together with valid?
120
+ # @return Array for valid properties with the reasons
121
+ def list_invalid_properties
122
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
123
+ invalid_properties = Array.new
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ true
132
+ end
133
+
134
+ # Checks equality by comparing each attribute.
135
+ # @param [Object] Object to be compared
136
+ def ==(o)
137
+ return true if self.equal?(o)
138
+ self.class == o.class &&
139
+ id == o.id &&
140
+ name == o.name &&
141
+ description == o.description &&
142
+ platform == o.platform &&
143
+ account_id == o.account_id &&
144
+ status == o.status &&
145
+ created_at == o.created_at
146
+ end
147
+
148
+ # @see the `==` method
149
+ # @param [Object] Object to be compared
150
+ def eql?(o)
151
+ self == o
152
+ end
153
+
154
+ # Calculates hash code according to all attributes.
155
+ # @return [Integer] Hash code
156
+ def hash
157
+ [id, name, description, platform, account_id, status, created_at].hash
158
+ end
159
+
160
+ # Builds the object from hash
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ # @return [Object] Returns the model itself
163
+ def self.build_from_hash(attributes)
164
+ return nil unless attributes.is_a?(Hash)
165
+ attributes = attributes.transform_keys(&:to_sym)
166
+ transformed_hash = {}
167
+ openapi_types.each_pair do |key, type|
168
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = nil
170
+ elsif type =~ /\AArray<(.*)>/i
171
+ # check to ensure the input is an array given that the attribute
172
+ # is documented as an array but the input is not
173
+ if attributes[attribute_map[key]].is_a?(Array)
174
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
175
+ end
176
+ elsif !attributes[attribute_map[key]].nil?
177
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
178
+ end
179
+ end
180
+ new(transformed_hash)
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ end
200
+
201
+ end
@@ -0,0 +1,156 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class CreateCommentAutomation200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :automation
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'success' => :'success',
26
+ :'automation' => :'automation'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'success' => :'Boolean',
44
+ :'automation' => :'CreateCommentAutomation200ResponseAutomation'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::CreateCommentAutomation200Response` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::CreateCommentAutomation200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'success')
71
+ self.success = attributes[:'success']
72
+ end
73
+
74
+ if attributes.key?(:'automation')
75
+ self.automation = attributes[:'automation']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ success == o.success &&
100
+ automation == o.automation
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Integer] Hash code
111
+ def hash
112
+ [success, automation].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def self.build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ attributes = attributes.transform_keys(&:to_sym)
121
+ transformed_hash = {}
122
+ openapi_types.each_pair do |key, type|
123
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = nil
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[attribute_map[key]].is_a?(Array)
129
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
+ end
131
+ elsif !attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
133
+ end
134
+ end
135
+ new(transformed_hash)
136
+ end
137
+
138
+ # Returns the object in the form of hash
139
+ # @return [Hash] Returns the object in the form of hash
140
+ def to_hash
141
+ hash = {}
142
+ self.class.attribute_map.each_pair do |attr, param|
143
+ value = self.send(attr)
144
+ if value.nil?
145
+ is_nullable = self.class.openapi_nullable.include?(attr)
146
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
147
+ end
148
+
149
+ hash[param] = _to_hash(value)
150
+ end
151
+ hash
152
+ end
153
+
154
+ end
155
+
156
+ end
@@ -0,0 +1,273 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class CreateCommentAutomation200ResponseAutomation < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :platform
23
+
24
+ attr_accessor :platform_post_id
25
+
26
+ attr_accessor :keywords
27
+
28
+ attr_accessor :match_mode
29
+
30
+ attr_accessor :dm_message
31
+
32
+ attr_accessor :comment_reply
33
+
34
+ attr_accessor :is_active
35
+
36
+ attr_accessor :stats
37
+
38
+ attr_accessor :created_at
39
+
40
+ class EnumAttributeValidator
41
+ attr_reader :datatype
42
+ attr_reader :allowable_values
43
+
44
+ def initialize(datatype, allowable_values)
45
+ @allowable_values = allowable_values.map do |value|
46
+ case datatype.to_s
47
+ when /Integer/i
48
+ value.to_i
49
+ when /Float/i
50
+ value.to_f
51
+ else
52
+ value
53
+ end
54
+ end
55
+ end
56
+
57
+ def valid?(value)
58
+ !value || allowable_values.include?(value)
59
+ end
60
+ end
61
+
62
+ # Attribute mapping from ruby-style variable name to JSON key.
63
+ def self.attribute_map
64
+ {
65
+ :'id' => :'id',
66
+ :'name' => :'name',
67
+ :'platform' => :'platform',
68
+ :'platform_post_id' => :'platformPostId',
69
+ :'keywords' => :'keywords',
70
+ :'match_mode' => :'matchMode',
71
+ :'dm_message' => :'dmMessage',
72
+ :'comment_reply' => :'commentReply',
73
+ :'is_active' => :'isActive',
74
+ :'stats' => :'stats',
75
+ :'created_at' => :'createdAt'
76
+ }
77
+ end
78
+
79
+ # Returns attribute mapping this model knows about
80
+ def self.acceptable_attribute_map
81
+ attribute_map
82
+ end
83
+
84
+ # Returns all the JSON keys this model knows about
85
+ def self.acceptable_attributes
86
+ acceptable_attribute_map.values
87
+ end
88
+
89
+ # Attribute type mapping.
90
+ def self.openapi_types
91
+ {
92
+ :'id' => :'String',
93
+ :'name' => :'String',
94
+ :'platform' => :'String',
95
+ :'platform_post_id' => :'String',
96
+ :'keywords' => :'Array<String>',
97
+ :'match_mode' => :'String',
98
+ :'dm_message' => :'String',
99
+ :'comment_reply' => :'String',
100
+ :'is_active' => :'Boolean',
101
+ :'stats' => :'CreateCommentAutomation200ResponseAutomationStats',
102
+ :'created_at' => :'Time'
103
+ }
104
+ end
105
+
106
+ # List of attributes with nullable: true
107
+ def self.openapi_nullable
108
+ Set.new([
109
+ ])
110
+ end
111
+
112
+ # Initializes the object
113
+ # @param [Hash] attributes Model attributes in the form of hash
114
+ def initialize(attributes = {})
115
+ if (!attributes.is_a?(Hash))
116
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::CreateCommentAutomation200ResponseAutomation` initialize method"
117
+ end
118
+
119
+ # check to see if the attribute exists and convert string to symbol for hash key
120
+ acceptable_attribute_map = self.class.acceptable_attribute_map
121
+ attributes = attributes.each_with_object({}) { |(k, v), h|
122
+ if (!acceptable_attribute_map.key?(k.to_sym))
123
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::CreateCommentAutomation200ResponseAutomation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
124
+ end
125
+ h[k.to_sym] = v
126
+ }
127
+
128
+ if attributes.key?(:'id')
129
+ self.id = attributes[:'id']
130
+ end
131
+
132
+ if attributes.key?(:'name')
133
+ self.name = attributes[:'name']
134
+ end
135
+
136
+ if attributes.key?(:'platform')
137
+ self.platform = attributes[:'platform']
138
+ end
139
+
140
+ if attributes.key?(:'platform_post_id')
141
+ self.platform_post_id = attributes[:'platform_post_id']
142
+ end
143
+
144
+ if attributes.key?(:'keywords')
145
+ if (value = attributes[:'keywords']).is_a?(Array)
146
+ self.keywords = value
147
+ end
148
+ end
149
+
150
+ if attributes.key?(:'match_mode')
151
+ self.match_mode = attributes[:'match_mode']
152
+ end
153
+
154
+ if attributes.key?(:'dm_message')
155
+ self.dm_message = attributes[:'dm_message']
156
+ end
157
+
158
+ if attributes.key?(:'comment_reply')
159
+ self.comment_reply = attributes[:'comment_reply']
160
+ end
161
+
162
+ if attributes.key?(:'is_active')
163
+ self.is_active = attributes[:'is_active']
164
+ end
165
+
166
+ if attributes.key?(:'stats')
167
+ self.stats = attributes[:'stats']
168
+ end
169
+
170
+ if attributes.key?(:'created_at')
171
+ self.created_at = attributes[:'created_at']
172
+ end
173
+ end
174
+
175
+ # Show invalid properties with the reasons. Usually used together with valid?
176
+ # @return Array for valid properties with the reasons
177
+ def list_invalid_properties
178
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
179
+ invalid_properties = Array.new
180
+ invalid_properties
181
+ end
182
+
183
+ # Check to see if the all the properties in the model are valid
184
+ # @return true if the model is valid
185
+ def valid?
186
+ warn '[DEPRECATED] the `valid?` method is obsolete'
187
+ match_mode_validator = EnumAttributeValidator.new('String', ["exact", "contains"])
188
+ return false unless match_mode_validator.valid?(@match_mode)
189
+ true
190
+ end
191
+
192
+ # Custom attribute writer method checking allowed values (enum).
193
+ # @param [Object] match_mode Object to be assigned
194
+ def match_mode=(match_mode)
195
+ validator = EnumAttributeValidator.new('String', ["exact", "contains"])
196
+ unless validator.valid?(match_mode)
197
+ fail ArgumentError, "invalid value for \"match_mode\", must be one of #{validator.allowable_values}."
198
+ end
199
+ @match_mode = match_mode
200
+ end
201
+
202
+ # Checks equality by comparing each attribute.
203
+ # @param [Object] Object to be compared
204
+ def ==(o)
205
+ return true if self.equal?(o)
206
+ self.class == o.class &&
207
+ id == o.id &&
208
+ name == o.name &&
209
+ platform == o.platform &&
210
+ platform_post_id == o.platform_post_id &&
211
+ keywords == o.keywords &&
212
+ match_mode == o.match_mode &&
213
+ dm_message == o.dm_message &&
214
+ comment_reply == o.comment_reply &&
215
+ is_active == o.is_active &&
216
+ stats == o.stats &&
217
+ created_at == o.created_at
218
+ end
219
+
220
+ # @see the `==` method
221
+ # @param [Object] Object to be compared
222
+ def eql?(o)
223
+ self == o
224
+ end
225
+
226
+ # Calculates hash code according to all attributes.
227
+ # @return [Integer] Hash code
228
+ def hash
229
+ [id, name, platform, platform_post_id, keywords, match_mode, dm_message, comment_reply, is_active, stats, created_at].hash
230
+ end
231
+
232
+ # Builds the object from hash
233
+ # @param [Hash] attributes Model attributes in the form of hash
234
+ # @return [Object] Returns the model itself
235
+ def self.build_from_hash(attributes)
236
+ return nil unless attributes.is_a?(Hash)
237
+ attributes = attributes.transform_keys(&:to_sym)
238
+ transformed_hash = {}
239
+ openapi_types.each_pair do |key, type|
240
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
241
+ transformed_hash["#{key}"] = nil
242
+ elsif type =~ /\AArray<(.*)>/i
243
+ # check to ensure the input is an array given that the attribute
244
+ # is documented as an array but the input is not
245
+ if attributes[attribute_map[key]].is_a?(Array)
246
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
247
+ end
248
+ elsif !attributes[attribute_map[key]].nil?
249
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
250
+ end
251
+ end
252
+ new(transformed_hash)
253
+ end
254
+
255
+ # Returns the object in the form of hash
256
+ # @return [Hash] Returns the object in the form of hash
257
+ def to_hash
258
+ hash = {}
259
+ self.class.attribute_map.each_pair do |attr, param|
260
+ value = self.send(attr)
261
+ if value.nil?
262
+ is_nullable = self.class.openapi_nullable.include?(attr)
263
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
264
+ end
265
+
266
+ hash[param] = _to_hash(value)
267
+ end
268
+ hash
269
+ end
270
+
271
+ end
272
+
273
+ end