pingram 1.0.45 → 1.0.47

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.
@@ -1,287 +0,0 @@
1
- =begin
2
- #Pingram
3
-
4
- #Internal API for notification delivery and management
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
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 Pingram
17
- # DNS record the customer must publish for domain verification.
18
- class GetSendersResponseInnerVerificationRecordsDkim < ApiModelBase
19
- attr_accessor :record_type
20
-
21
- # Relative name for the parent DNS zone UI (e.g. pingram._domainkey.testing).
22
- attr_accessor :record_name
23
-
24
- # Full hostname (e.g. pingram._domainkey.testing.something.com).
25
- attr_accessor :host
26
-
27
- attr_accessor :record_value
28
-
29
- attr_accessor :priority
30
-
31
- attr_accessor :required
32
-
33
- class EnumAttributeValidator
34
- attr_reader :datatype
35
- attr_reader :allowable_values
36
-
37
- def initialize(datatype, allowable_values)
38
- @allowable_values = allowable_values.map do |value|
39
- case datatype.to_s
40
- when /Integer/i
41
- value.to_i
42
- when /Float/i
43
- value.to_f
44
- else
45
- value
46
- end
47
- end
48
- end
49
-
50
- def valid?(value)
51
- !value || allowable_values.include?(value)
52
- end
53
- end
54
-
55
- # Attribute mapping from ruby-style variable name to JSON key.
56
- def self.attribute_map
57
- {
58
- :'record_type' => :'recordType',
59
- :'record_name' => :'recordName',
60
- :'host' => :'host',
61
- :'record_value' => :'recordValue',
62
- :'priority' => :'priority',
63
- :'required' => :'required'
64
- }
65
- end
66
-
67
- # Returns attribute mapping this model knows about
68
- def self.acceptable_attribute_map
69
- attribute_map
70
- end
71
-
72
- # Returns all the JSON keys this model knows about
73
- def self.acceptable_attributes
74
- acceptable_attribute_map.values
75
- end
76
-
77
- # Attribute type mapping.
78
- def self.openapi_types
79
- {
80
- :'record_type' => :'String',
81
- :'record_name' => :'String',
82
- :'host' => :'String',
83
- :'record_value' => :'String',
84
- :'priority' => :'Float',
85
- :'required' => :'Boolean'
86
- }
87
- end
88
-
89
- # List of attributes with nullable: true
90
- def self.openapi_nullable
91
- Set.new([
92
- ])
93
- end
94
-
95
- # Initializes the object
96
- # @param [Hash] attributes Model attributes in the form of hash
97
- def initialize(attributes = {})
98
- if (!attributes.is_a?(Hash))
99
- fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetSendersResponseInnerVerificationRecordsDkim` initialize method"
100
- end
101
-
102
- # check to see if the attribute exists and convert string to symbol for hash key
103
- acceptable_attribute_map = self.class.acceptable_attribute_map
104
- attributes = attributes.each_with_object({}) { |(k, v), h|
105
- if (!acceptable_attribute_map.key?(k.to_sym))
106
- fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetSendersResponseInnerVerificationRecordsDkim`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
107
- end
108
- h[k.to_sym] = v
109
- }
110
-
111
- if attributes.key?(:'record_type')
112
- self.record_type = attributes[:'record_type']
113
- else
114
- self.record_type = nil
115
- end
116
-
117
- if attributes.key?(:'record_name')
118
- self.record_name = attributes[:'record_name']
119
- else
120
- self.record_name = nil
121
- end
122
-
123
- if attributes.key?(:'host')
124
- self.host = attributes[:'host']
125
- else
126
- self.host = nil
127
- end
128
-
129
- if attributes.key?(:'record_value')
130
- self.record_value = attributes[:'record_value']
131
- else
132
- self.record_value = nil
133
- end
134
-
135
- if attributes.key?(:'priority')
136
- self.priority = attributes[:'priority']
137
- end
138
-
139
- if attributes.key?(:'required')
140
- self.required = attributes[:'required']
141
- end
142
- end
143
-
144
- # Show invalid properties with the reasons. Usually used together with valid?
145
- # @return Array for valid properties with the reasons
146
- def list_invalid_properties
147
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
148
- invalid_properties = Array.new
149
- if @record_type.nil?
150
- invalid_properties.push('invalid value for "record_type", record_type cannot be nil.')
151
- end
152
-
153
- if @record_name.nil?
154
- invalid_properties.push('invalid value for "record_name", record_name cannot be nil.')
155
- end
156
-
157
- if @host.nil?
158
- invalid_properties.push('invalid value for "host", host cannot be nil.')
159
- end
160
-
161
- if @record_value.nil?
162
- invalid_properties.push('invalid value for "record_value", record_value cannot be nil.')
163
- end
164
-
165
- invalid_properties
166
- end
167
-
168
- # Check to see if the all the properties in the model are valid
169
- # @return true if the model is valid
170
- def valid?
171
- warn '[DEPRECATED] the `valid?` method is obsolete'
172
- return false if @record_type.nil?
173
- record_type_validator = EnumAttributeValidator.new('String', ["TXT", "MX", "CNAME"])
174
- return false unless record_type_validator.valid?(@record_type)
175
- return false if @record_name.nil?
176
- return false if @host.nil?
177
- return false if @record_value.nil?
178
- true
179
- end
180
-
181
- # Custom attribute writer method checking allowed values (enum).
182
- # @param [Object] record_type Object to be assigned
183
- def record_type=(record_type)
184
- validator = EnumAttributeValidator.new('String', ["TXT", "MX", "CNAME"])
185
- unless validator.valid?(record_type)
186
- fail ArgumentError, "invalid value for \"record_type\", must be one of #{validator.allowable_values}."
187
- end
188
- @record_type = record_type
189
- end
190
-
191
- # Custom attribute writer method with validation
192
- # @param [Object] record_name Value to be assigned
193
- def record_name=(record_name)
194
- if record_name.nil?
195
- fail ArgumentError, 'record_name cannot be nil'
196
- end
197
-
198
- @record_name = record_name
199
- end
200
-
201
- # Custom attribute writer method with validation
202
- # @param [Object] host Value to be assigned
203
- def host=(host)
204
- if host.nil?
205
- fail ArgumentError, 'host cannot be nil'
206
- end
207
-
208
- @host = host
209
- end
210
-
211
- # Custom attribute writer method with validation
212
- # @param [Object] record_value Value to be assigned
213
- def record_value=(record_value)
214
- if record_value.nil?
215
- fail ArgumentError, 'record_value cannot be nil'
216
- end
217
-
218
- @record_value = record_value
219
- end
220
-
221
- # Checks equality by comparing each attribute.
222
- # @param [Object] Object to be compared
223
- def ==(o)
224
- return true if self.equal?(o)
225
- self.class == o.class &&
226
- record_type == o.record_type &&
227
- record_name == o.record_name &&
228
- host == o.host &&
229
- record_value == o.record_value &&
230
- priority == o.priority &&
231
- required == o.required
232
- end
233
-
234
- # @see the `==` method
235
- # @param [Object] Object to be compared
236
- def eql?(o)
237
- self == o
238
- end
239
-
240
- # Calculates hash code according to all attributes.
241
- # @return [Integer] Hash code
242
- def hash
243
- [record_type, record_name, host, record_value, priority, required].hash
244
- end
245
-
246
- # Builds the object from hash
247
- # @param [Hash] attributes Model attributes in the form of hash
248
- # @return [Object] Returns the model itself
249
- def self.build_from_hash(attributes)
250
- return nil unless attributes.is_a?(Hash)
251
- attributes = attributes.transform_keys(&:to_sym)
252
- transformed_hash = {}
253
- openapi_types.each_pair do |key, type|
254
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
255
- transformed_hash["#{key}"] = nil
256
- elsif type =~ /\AArray<(.*)>/i
257
- # check to ensure the input is an array given that the attribute
258
- # is documented as an array but the input is not
259
- if attributes[attribute_map[key]].is_a?(Array)
260
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
261
- end
262
- elsif !attributes[attribute_map[key]].nil?
263
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
264
- end
265
- end
266
- new(transformed_hash)
267
- end
268
-
269
- # Returns the object in the form of hash
270
- # @return [Hash] Returns the object in the form of hash
271
- def to_hash
272
- hash = {}
273
- self.class.attribute_map.each_pair do |attr, param|
274
- value = self.send(attr)
275
- if value.nil?
276
- is_nullable = self.class.openapi_nullable.include?(attr)
277
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
278
- end
279
-
280
- hash[param] = _to_hash(value)
281
- end
282
- hash
283
- end
284
-
285
- end
286
-
287
- end