late-sdk 0.0.75 → 0.0.77

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 (100) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -1
  3. data/docs/ActivateSequence200Response.md +20 -0
  4. data/docs/AddBroadcastRecipients200Response.md +22 -0
  5. data/docs/BroadcastsApi.md +56 -48
  6. data/docs/CancelBroadcast200Response.md +20 -0
  7. data/docs/CancelBroadcast200ResponseBroadcast.md +20 -0
  8. data/docs/CreateSequenceRequestStepsInner.md +1 -1
  9. data/docs/EnrollContacts200Response.md +22 -0
  10. data/docs/GetBroadcast200Response.md +20 -0
  11. data/docs/GetBroadcast200ResponseBroadcast.md +54 -0
  12. data/docs/{CreateSequenceRequestStepsInnerMessage.md → GetBroadcast200ResponseBroadcastMessage.md} +2 -2
  13. data/docs/GetBroadcast200ResponseBroadcastSegmentFilters.md +18 -0
  14. data/docs/GetSequence200Response.md +20 -0
  15. data/docs/GetSequence200ResponseSequence.md +44 -0
  16. data/docs/GetSequence200ResponseSequenceStepsInner.md +24 -0
  17. data/docs/GetSequence200ResponseSequenceStepsInnerTemplate.md +22 -0
  18. data/docs/ListBroadcastRecipients200Response.md +22 -0
  19. data/docs/ListBroadcastRecipients200ResponseRecipientsInner.md +38 -0
  20. data/docs/ListBroadcasts200Response.md +22 -0
  21. data/docs/ListBroadcasts200ResponseBroadcastsInner.md +50 -0
  22. data/docs/ListSequenceEnrollments200Response.md +22 -0
  23. data/docs/ListSequenceEnrollments200ResponseEnrollmentsInner.md +40 -0
  24. data/docs/ListSequences200Response.md +22 -0
  25. data/docs/ListSequences200ResponseSequencesInner.md +46 -0
  26. data/docs/ScheduleBroadcast200Response.md +20 -0
  27. data/docs/ScheduleBroadcast200ResponseBroadcast.md +22 -0
  28. data/docs/SendBroadcast200Response.md +26 -0
  29. data/docs/SequencesApi.md +49 -42
  30. data/docs/UpdateBroadcast200Response.md +20 -0
  31. data/docs/UpdateBroadcast200ResponseBroadcast.md +26 -0
  32. data/docs/UpdateSequence200Response.md +20 -0
  33. data/docs/UpdateSequence200ResponseSequence.md +32 -0
  34. data/lib/late-sdk/api/broadcasts_api.rb +40 -40
  35. data/lib/late-sdk/api/sequences_api.rb +35 -35
  36. data/lib/late-sdk/models/activate_sequence200_response.rb +156 -0
  37. data/lib/late-sdk/models/add_broadcast_recipients200_response.rb +167 -0
  38. data/lib/late-sdk/models/cancel_broadcast200_response.rb +156 -0
  39. data/lib/late-sdk/models/cancel_broadcast200_response_broadcast.rb +156 -0
  40. data/lib/late-sdk/models/create_sequence_request_steps_inner.rb +1 -1
  41. data/lib/late-sdk/models/enroll_contacts200_response.rb +167 -0
  42. data/lib/late-sdk/models/get_broadcast200_response.rb +156 -0
  43. data/lib/late-sdk/models/get_broadcast200_response_broadcast.rb +343 -0
  44. data/lib/late-sdk/models/{create_sequence_request_steps_inner_message.rb → get_broadcast200_response_broadcast_message.rb} +3 -3
  45. data/lib/late-sdk/models/get_broadcast200_response_broadcast_segment_filters.rb +149 -0
  46. data/lib/late-sdk/models/get_sequence200_response.rb +156 -0
  47. data/lib/late-sdk/models/get_sequence200_response_sequence.rb +300 -0
  48. data/lib/late-sdk/models/get_sequence200_response_sequence_steps_inner.rb +174 -0
  49. data/lib/late-sdk/models/get_sequence200_response_sequence_steps_inner_template.rb +165 -0
  50. data/lib/late-sdk/models/list_broadcast_recipients200_response.rb +167 -0
  51. data/lib/late-sdk/models/list_broadcast_recipients200_response_recipients_inner.rb +271 -0
  52. data/lib/late-sdk/models/list_broadcasts200_response.rb +167 -0
  53. data/lib/late-sdk/models/list_broadcasts200_response_broadcasts_inner.rb +327 -0
  54. data/lib/late-sdk/models/list_sequence_enrollments200_response.rb +167 -0
  55. data/lib/late-sdk/models/list_sequence_enrollments200_response_enrollments_inner.rb +280 -0
  56. data/lib/late-sdk/models/list_sequences200_response.rb +167 -0
  57. data/lib/late-sdk/models/list_sequences200_response_sequences_inner.rb +309 -0
  58. data/lib/late-sdk/models/schedule_broadcast200_response.rb +156 -0
  59. data/lib/late-sdk/models/schedule_broadcast200_response_broadcast.rb +165 -0
  60. data/lib/late-sdk/models/send_broadcast200_response.rb +221 -0
  61. data/lib/late-sdk/models/update_broadcast200_response.rb +156 -0
  62. data/lib/late-sdk/models/update_broadcast200_response_broadcast.rb +183 -0
  63. data/lib/late-sdk/models/update_sequence200_response.rb +156 -0
  64. data/lib/late-sdk/models/update_sequence200_response_sequence.rb +212 -0
  65. data/lib/late-sdk/version.rb +1 -1
  66. data/lib/late-sdk.rb +28 -1
  67. data/openapi.yaml +318 -15
  68. data/spec/api/broadcasts_api_spec.rb +8 -8
  69. data/spec/api/sequences_api_spec.rb +7 -7
  70. data/spec/models/activate_sequence200_response_spec.rb +42 -0
  71. data/spec/models/add_broadcast_recipients200_response_spec.rb +48 -0
  72. data/spec/models/cancel_broadcast200_response_broadcast_spec.rb +42 -0
  73. data/spec/models/cancel_broadcast200_response_spec.rb +42 -0
  74. data/spec/models/enroll_contacts200_response_spec.rb +48 -0
  75. data/spec/models/{create_sequence_request_steps_inner_message_spec.rb → get_broadcast200_response_broadcast_message_spec.rb} +6 -6
  76. data/spec/models/get_broadcast200_response_broadcast_segment_filters_spec.rb +36 -0
  77. data/spec/models/get_broadcast200_response_broadcast_spec.rb +148 -0
  78. data/spec/models/get_broadcast200_response_spec.rb +42 -0
  79. data/spec/models/get_sequence200_response_sequence_spec.rb +118 -0
  80. data/spec/models/get_sequence200_response_sequence_steps_inner_spec.rb +54 -0
  81. data/spec/models/get_sequence200_response_sequence_steps_inner_template_spec.rb +48 -0
  82. data/spec/models/get_sequence200_response_spec.rb +42 -0
  83. data/spec/models/list_broadcast_recipients200_response_recipients_inner_spec.rb +100 -0
  84. data/spec/models/list_broadcast_recipients200_response_spec.rb +48 -0
  85. data/spec/models/list_broadcasts200_response_broadcasts_inner_spec.rb +136 -0
  86. data/spec/models/list_broadcasts200_response_spec.rb +48 -0
  87. data/spec/models/list_sequence_enrollments200_response_enrollments_inner_spec.rb +106 -0
  88. data/spec/models/list_sequence_enrollments200_response_spec.rb +48 -0
  89. data/spec/models/list_sequences200_response_sequences_inner_spec.rb +124 -0
  90. data/spec/models/list_sequences200_response_spec.rb +48 -0
  91. data/spec/models/schedule_broadcast200_response_broadcast_spec.rb +48 -0
  92. data/spec/models/schedule_broadcast200_response_spec.rb +42 -0
  93. data/spec/models/send_broadcast200_response_spec.rb +64 -0
  94. data/spec/models/update_broadcast200_response_broadcast_spec.rb +60 -0
  95. data/spec/models/update_broadcast200_response_spec.rb +42 -0
  96. data/spec/models/update_sequence200_response_sequence_spec.rb +78 -0
  97. data/spec/models/update_sequence200_response_spec.rb +42 -0
  98. data/zernio-sdk-0.0.77.gem +0 -0
  99. metadata +114 -6
  100. data/zernio-sdk-0.0.75.gem +0 -0
@@ -0,0 +1,221 @@
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 SendBroadcast200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ # Current broadcast status after processing first batch
21
+ attr_accessor :status
22
+
23
+ # Recipients sent in this batch
24
+ attr_accessor :sent
25
+
26
+ # Recipients failed in this batch
27
+ attr_accessor :failed
28
+
29
+ # Total recipient count
30
+ attr_accessor :recipient_count
31
+
32
+ class EnumAttributeValidator
33
+ attr_reader :datatype
34
+ attr_reader :allowable_values
35
+
36
+ def initialize(datatype, allowable_values)
37
+ @allowable_values = allowable_values.map do |value|
38
+ case datatype.to_s
39
+ when /Integer/i
40
+ value.to_i
41
+ when /Float/i
42
+ value.to_f
43
+ else
44
+ value
45
+ end
46
+ end
47
+ end
48
+
49
+ def valid?(value)
50
+ !value || allowable_values.include?(value)
51
+ end
52
+ end
53
+
54
+ # Attribute mapping from ruby-style variable name to JSON key.
55
+ def self.attribute_map
56
+ {
57
+ :'success' => :'success',
58
+ :'status' => :'status',
59
+ :'sent' => :'sent',
60
+ :'failed' => :'failed',
61
+ :'recipient_count' => :'recipientCount'
62
+ }
63
+ end
64
+
65
+ # Returns attribute mapping this model knows about
66
+ def self.acceptable_attribute_map
67
+ attribute_map
68
+ end
69
+
70
+ # Returns all the JSON keys this model knows about
71
+ def self.acceptable_attributes
72
+ acceptable_attribute_map.values
73
+ end
74
+
75
+ # Attribute type mapping.
76
+ def self.openapi_types
77
+ {
78
+ :'success' => :'Boolean',
79
+ :'status' => :'String',
80
+ :'sent' => :'Integer',
81
+ :'failed' => :'Integer',
82
+ :'recipient_count' => :'Integer'
83
+ }
84
+ end
85
+
86
+ # List of attributes with nullable: true
87
+ def self.openapi_nullable
88
+ Set.new([
89
+ ])
90
+ end
91
+
92
+ # Initializes the object
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ def initialize(attributes = {})
95
+ if (!attributes.is_a?(Hash))
96
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::SendBroadcast200Response` initialize method"
97
+ end
98
+
99
+ # check to see if the attribute exists and convert string to symbol for hash key
100
+ acceptable_attribute_map = self.class.acceptable_attribute_map
101
+ attributes = attributes.each_with_object({}) { |(k, v), h|
102
+ if (!acceptable_attribute_map.key?(k.to_sym))
103
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::SendBroadcast200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
104
+ end
105
+ h[k.to_sym] = v
106
+ }
107
+
108
+ if attributes.key?(:'success')
109
+ self.success = attributes[:'success']
110
+ end
111
+
112
+ if attributes.key?(:'status')
113
+ self.status = attributes[:'status']
114
+ end
115
+
116
+ if attributes.key?(:'sent')
117
+ self.sent = attributes[:'sent']
118
+ end
119
+
120
+ if attributes.key?(:'failed')
121
+ self.failed = attributes[:'failed']
122
+ end
123
+
124
+ if attributes.key?(:'recipient_count')
125
+ self.recipient_count = attributes[:'recipient_count']
126
+ end
127
+ end
128
+
129
+ # Show invalid properties with the reasons. Usually used together with valid?
130
+ # @return Array for valid properties with the reasons
131
+ def list_invalid_properties
132
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
133
+ invalid_properties = Array.new
134
+ invalid_properties
135
+ end
136
+
137
+ # Check to see if the all the properties in the model are valid
138
+ # @return true if the model is valid
139
+ def valid?
140
+ warn '[DEPRECATED] the `valid?` method is obsolete'
141
+ status_validator = EnumAttributeValidator.new('String', ["sending", "completed", "failed"])
142
+ return false unless status_validator.valid?(@status)
143
+ true
144
+ end
145
+
146
+ # Custom attribute writer method checking allowed values (enum).
147
+ # @param [Object] status Object to be assigned
148
+ def status=(status)
149
+ validator = EnumAttributeValidator.new('String', ["sending", "completed", "failed"])
150
+ unless validator.valid?(status)
151
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
152
+ end
153
+ @status = status
154
+ end
155
+
156
+ # Checks equality by comparing each attribute.
157
+ # @param [Object] Object to be compared
158
+ def ==(o)
159
+ return true if self.equal?(o)
160
+ self.class == o.class &&
161
+ success == o.success &&
162
+ status == o.status &&
163
+ sent == o.sent &&
164
+ failed == o.failed &&
165
+ recipient_count == o.recipient_count
166
+ end
167
+
168
+ # @see the `==` method
169
+ # @param [Object] Object to be compared
170
+ def eql?(o)
171
+ self == o
172
+ end
173
+
174
+ # Calculates hash code according to all attributes.
175
+ # @return [Integer] Hash code
176
+ def hash
177
+ [success, status, sent, failed, recipient_count].hash
178
+ end
179
+
180
+ # Builds the object from hash
181
+ # @param [Hash] attributes Model attributes in the form of hash
182
+ # @return [Object] Returns the model itself
183
+ def self.build_from_hash(attributes)
184
+ return nil unless attributes.is_a?(Hash)
185
+ attributes = attributes.transform_keys(&:to_sym)
186
+ transformed_hash = {}
187
+ openapi_types.each_pair do |key, type|
188
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
189
+ transformed_hash["#{key}"] = nil
190
+ elsif type =~ /\AArray<(.*)>/i
191
+ # check to ensure the input is an array given that the attribute
192
+ # is documented as an array but the input is not
193
+ if attributes[attribute_map[key]].is_a?(Array)
194
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
195
+ end
196
+ elsif !attributes[attribute_map[key]].nil?
197
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
198
+ end
199
+ end
200
+ new(transformed_hash)
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ self.class.attribute_map.each_pair do |attr, param|
208
+ value = self.send(attr)
209
+ if value.nil?
210
+ is_nullable = self.class.openapi_nullable.include?(attr)
211
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
212
+ end
213
+
214
+ hash[param] = _to_hash(value)
215
+ end
216
+ hash
217
+ end
218
+
219
+ end
220
+
221
+ 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 UpdateBroadcast200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :broadcast
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'success' => :'success',
26
+ :'broadcast' => :'broadcast'
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
+ :'broadcast' => :'UpdateBroadcast200ResponseBroadcast'
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::UpdateBroadcast200Response` 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::UpdateBroadcast200Response`. 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?(:'broadcast')
75
+ self.broadcast = attributes[:'broadcast']
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
+ broadcast == o.broadcast
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, broadcast].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,183 @@
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 UpdateBroadcast200ResponseBroadcast < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :description
23
+
24
+ attr_accessor :status
25
+
26
+ attr_accessor :updated_at
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'id' => :'id',
32
+ :'name' => :'name',
33
+ :'description' => :'description',
34
+ :'status' => :'status',
35
+ :'updated_at' => :'updatedAt'
36
+ }
37
+ end
38
+
39
+ # Returns attribute mapping this model knows about
40
+ def self.acceptable_attribute_map
41
+ attribute_map
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ acceptable_attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'id' => :'String',
53
+ :'name' => :'String',
54
+ :'description' => :'String',
55
+ :'status' => :'String',
56
+ :'updated_at' => :'Time'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::UpdateBroadcast200ResponseBroadcast` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ acceptable_attribute_map = self.class.acceptable_attribute_map
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!acceptable_attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::UpdateBroadcast200ResponseBroadcast`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'id')
83
+ self.id = attributes[:'id']
84
+ end
85
+
86
+ if attributes.key?(:'name')
87
+ self.name = attributes[:'name']
88
+ end
89
+
90
+ if attributes.key?(:'description')
91
+ self.description = attributes[:'description']
92
+ end
93
+
94
+ if attributes.key?(:'status')
95
+ self.status = attributes[:'status']
96
+ end
97
+
98
+ if attributes.key?(:'updated_at')
99
+ self.updated_at = attributes[:'updated_at']
100
+ end
101
+ end
102
+
103
+ # Show invalid properties with the reasons. Usually used together with valid?
104
+ # @return Array for valid properties with the reasons
105
+ def list_invalid_properties
106
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
107
+ invalid_properties = Array.new
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ true
116
+ end
117
+
118
+ # Checks equality by comparing each attribute.
119
+ # @param [Object] Object to be compared
120
+ def ==(o)
121
+ return true if self.equal?(o)
122
+ self.class == o.class &&
123
+ id == o.id &&
124
+ name == o.name &&
125
+ description == o.description &&
126
+ status == o.status &&
127
+ updated_at == o.updated_at
128
+ end
129
+
130
+ # @see the `==` method
131
+ # @param [Object] Object to be compared
132
+ def eql?(o)
133
+ self == o
134
+ end
135
+
136
+ # Calculates hash code according to all attributes.
137
+ # @return [Integer] Hash code
138
+ def hash
139
+ [id, name, description, status, updated_at].hash
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def self.build_from_hash(attributes)
146
+ return nil unless attributes.is_a?(Hash)
147
+ attributes = attributes.transform_keys(&:to_sym)
148
+ transformed_hash = {}
149
+ openapi_types.each_pair do |key, type|
150
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = nil
152
+ elsif type =~ /\AArray<(.*)>/i
153
+ # check to ensure the input is an array given that the attribute
154
+ # is documented as an array but the input is not
155
+ if attributes[attribute_map[key]].is_a?(Array)
156
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
157
+ end
158
+ elsif !attributes[attribute_map[key]].nil?
159
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
160
+ end
161
+ end
162
+ new(transformed_hash)
163
+ end
164
+
165
+ # Returns the object in the form of hash
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_hash
168
+ hash = {}
169
+ self.class.attribute_map.each_pair do |attr, param|
170
+ value = self.send(attr)
171
+ if value.nil?
172
+ is_nullable = self.class.openapi_nullable.include?(attr)
173
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
174
+ end
175
+
176
+ hash[param] = _to_hash(value)
177
+ end
178
+ hash
179
+ end
180
+
181
+ end
182
+
183
+ end