fastly 8.0.1 → 8.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +198 -130
  3. data/Gemfile.lock +1 -1
  4. data/README.md +13 -7
  5. data/docs/{ErrorResponse.md → AutomationTokenErrorResponse.md} +1 -1
  6. data/docs/AutomationTokensApi.md +2 -2
  7. data/docs/Backend.md +1 -1
  8. data/docs/BackendApi.md +4 -4
  9. data/docs/BackendResponse.md +1 -1
  10. data/docs/BillingInvoicesApi.md +96 -0
  11. data/docs/Director.md +1 -1
  12. data/docs/DirectorApi.md +2 -2
  13. data/docs/DirectorResponse.md +1 -1
  14. data/docs/DomainInspectorHistoricalApi.md +4 -4
  15. data/docs/DomainInspectorRealtimeEntry.md +1 -1
  16. data/docs/Error.md +13 -0
  17. data/docs/ErrorResponseData.md +11 -0
  18. data/docs/Invoice.md +18 -0
  19. data/docs/InvoiceResponse.md +18 -0
  20. data/docs/Invoicelineitems.md +18 -0
  21. data/docs/KvStoreApi.md +1 -1
  22. data/docs/ListInvoicesResponse.md +11 -0
  23. data/docs/Listinvoices.md +11 -0
  24. data/docs/LoggingScalyrAdditional.md +1 -1
  25. data/docs/LoggingScalyrApi.md +4 -4
  26. data/docs/LoggingScalyrResponse.md +1 -1
  27. data/docs/Metadata.md +13 -0
  28. data/docs/OriginInspectorHistoricalApi.md +4 -4
  29. data/docs/OriginInspectorRealtimeEntry.md +1 -1
  30. data/docs/PoolAdditional.md +1 -1
  31. data/docs/PoolApi.md +4 -4
  32. data/docs/PoolResponse.md +1 -1
  33. data/docs/PoolResponsePost.md +1 -1
  34. data/docs/Pop.md +2 -2
  35. data/docs/PublishApi.md +1 -1
  36. data/docs/RealtimeEntry.md +1 -1
  37. data/docs/Results.md +2 -0
  38. data/docs/SecretStoreApi.md +4 -2
  39. data/docs/SecretStoreItemApi.md +2 -2
  40. data/docs/ServiceDetail.md +1 -1
  41. data/docs/ServiceListResponse.md +2 -2
  42. data/docs/ServiceListResponseAllOf.md +2 -2
  43. data/docs/ServiceResponse.md +1 -1
  44. data/docs/ServiceResponseAllOf.md +1 -1
  45. data/docs/TlsConfigurationResponseAttributes.md +1 -1
  46. data/docs/TlsConfigurationResponseAttributesAllOf.md +1 -1
  47. data/docs/TlsCsr.md +10 -0
  48. data/docs/TlsCsrData.md +12 -0
  49. data/docs/TlsCsrDataAttributes.md +20 -0
  50. data/docs/TlsCsrErrorResponse.md +10 -0
  51. data/docs/TlsCsrResponse.md +10 -0
  52. data/docs/TlsCsrResponseAttributes.md +10 -0
  53. data/docs/TlsCsrResponseData.md +13 -0
  54. data/docs/TlsCsrsApi.md +52 -0
  55. data/docs/TlsSubscriptionResponseAttributes.md +1 -0
  56. data/docs/TlsSubscriptionResponseAttributesAllOf.md +1 -0
  57. data/docs/TokensApi.md +1 -1
  58. data/docs/TypeTlsCsr.md +9 -0
  59. data/docs/VclApi.md +1 -1
  60. data/docs/WafActiveRulesApi.md +1 -1
  61. data/lib/fastly/api/automation_tokens_api.rb +3 -3
  62. data/lib/fastly/api/backend_api.rb +4 -4
  63. data/lib/fastly/api/billing_invoices_api.rb +151 -0
  64. data/lib/fastly/api/director_api.rb +2 -2
  65. data/lib/fastly/api/domain_inspector_historical_api.rb +4 -4
  66. data/lib/fastly/api/kv_store_api.rb +2 -2
  67. data/lib/fastly/api/logging_scalyr_api.rb +4 -4
  68. data/lib/fastly/api/origin_inspector_historical_api.rb +4 -4
  69. data/lib/fastly/api/pool_api.rb +4 -4
  70. data/lib/fastly/api/publish_api.rb +2 -2
  71. data/lib/fastly/api/secret_store_api.rb +5 -2
  72. data/lib/fastly/api/secret_store_item_api.rb +2 -2
  73. data/lib/fastly/api/tls_csrs_api.rb +83 -0
  74. data/lib/fastly/api/tokens_api.rb +2 -2
  75. data/lib/fastly/api/vcl_api.rb +2 -2
  76. data/lib/fastly/api/waf_active_rules_api.rb +2 -2
  77. data/lib/fastly/configuration.rb +18 -0
  78. data/lib/fastly/models/{error_response.rb → automation_token_error_response.rb} +3 -3
  79. data/lib/fastly/models/backend.rb +1 -1
  80. data/lib/fastly/models/backend_response.rb +1 -1
  81. data/lib/fastly/models/director.rb +1 -1
  82. data/lib/fastly/models/director_response.rb +1 -1
  83. data/lib/fastly/models/domain_inspector_realtime_entry.rb +1 -1
  84. data/lib/fastly/models/error.rb +243 -0
  85. data/lib/fastly/models/error_response_data.rb +225 -0
  86. data/lib/fastly/models/event_attributes.rb +2 -2
  87. data/lib/fastly/models/invoice.rb +298 -0
  88. data/lib/fastly/models/invoice_response.rb +305 -0
  89. data/lib/fastly/models/invoicelineitems.rb +297 -0
  90. data/lib/fastly/models/list_invoices_response.rb +234 -0
  91. data/lib/fastly/models/listinvoices.rb +227 -0
  92. data/lib/fastly/models/logging_scalyr_additional.rb +1 -1
  93. data/lib/fastly/models/logging_scalyr_response.rb +1 -1
  94. data/lib/fastly/models/metadata.rb +250 -0
  95. data/lib/fastly/models/origin_inspector_realtime_entry.rb +1 -1
  96. data/lib/fastly/models/pool_additional.rb +1 -1
  97. data/lib/fastly/models/pool_response.rb +1 -1
  98. data/lib/fastly/models/pool_response_post.rb +1 -1
  99. data/lib/fastly/models/pop.rb +2 -2
  100. data/lib/fastly/models/realtime_entry.rb +1 -1
  101. data/lib/fastly/models/relationship_tls_certificate.rb +1 -1
  102. data/lib/fastly/models/relationship_tls_configuration.rb +1 -1
  103. data/lib/fastly/models/results.rb +21 -1
  104. data/lib/fastly/models/service_detail.rb +1 -1
  105. data/lib/fastly/models/service_list_response.rb +2 -2
  106. data/lib/fastly/models/service_list_response_all_of.rb +2 -2
  107. data/lib/fastly/models/service_response.rb +1 -1
  108. data/lib/fastly/models/service_response_all_of.rb +1 -1
  109. data/lib/fastly/models/tls_configuration_response_attributes.rb +1 -1
  110. data/lib/fastly/models/tls_configuration_response_attributes_all_of.rb +1 -1
  111. data/lib/fastly/models/tls_csr.rb +216 -0
  112. data/lib/fastly/models/tls_csr_data.rb +236 -0
  113. data/lib/fastly/models/tls_csr_data_attributes.rb +358 -0
  114. data/lib/fastly/models/tls_csr_error_response.rb +218 -0
  115. data/lib/fastly/models/tls_csr_response.rb +216 -0
  116. data/lib/fastly/models/tls_csr_response_attributes.rb +217 -0
  117. data/lib/fastly/models/tls_csr_response_data.rb +245 -0
  118. data/lib/fastly/models/tls_subscription_data_attributes.rb +2 -2
  119. data/lib/fastly/models/tls_subscription_response_attributes.rb +14 -4
  120. data/lib/fastly/models/tls_subscription_response_attributes_all_of.rb +14 -4
  121. data/lib/fastly/models/type_tls_csr.rb +34 -0
  122. data/lib/fastly/version.rb +1 -1
  123. data/lib/fastly.rb +19 -1
  124. data/sig.json +1 -1
  125. metadata +40 -4
@@ -28,7 +28,7 @@ module Fastly
28
28
  # The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`.
29
29
  attr_accessor :quorum
30
30
 
31
- # Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding.
31
+ # Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding.
32
32
  attr_accessor :shield
33
33
 
34
34
  # What type of load balance group to use.
@@ -19,7 +19,7 @@ module Fastly
19
19
  # Groups [measurements](#measurements-data-model) by backend name and then by IP address.
20
20
  attr_accessor :aggregated
21
21
 
22
- # Groups [measurements](#measurements-data-model) by POP, then backend name, and then IP address. See the [POPs API](/reference/api/utils/pops/) for details about POP identifiers.
22
+ # Groups [measurements](#measurements-data-model) by POP, then backend name, and then IP address. See the [POPs API](https://www.fastly.com/documentation/reference/api/utils/pops/) for details about POP identifiers.
23
23
  attr_accessor :datacenter
24
24
 
25
25
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -0,0 +1,243 @@
1
+ =begin
2
+ #Fastly API
3
+
4
+ #Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: oss@fastly.com
8
+
9
+ =end
10
+
11
+ require 'date'
12
+ require 'time'
13
+
14
+ module Fastly
15
+ class Error
16
+ attr_accessor :type
17
+
18
+ attr_accessor :title
19
+
20
+ attr_accessor :code
21
+
22
+ attr_accessor :status
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'type' => :'type',
28
+ :'title' => :'title',
29
+ :'code' => :'code',
30
+ :'status' => :'status'
31
+ }
32
+ end
33
+
34
+ # Returns all the JSON keys this model knows about
35
+ def self.acceptable_attributes
36
+ attribute_map.values
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.fastly_types
41
+ {
42
+ :'type' => :'String',
43
+ :'title' => :'String',
44
+ :'code' => :'String',
45
+ :'status' => :'String'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.fastly_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::Error` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!self.class.attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::Error`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'type')
71
+ self.type = attributes[:'type']
72
+ end
73
+
74
+ if attributes.key?(:'title')
75
+ self.title = attributes[:'title']
76
+ end
77
+
78
+ if attributes.key?(:'code')
79
+ self.code = attributes[:'code']
80
+ end
81
+
82
+ if attributes.key?(:'status')
83
+ self.status = attributes[:'status']
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ invalid_properties = Array.new
91
+ invalid_properties
92
+ end
93
+
94
+ # Check to see if the all the properties in the model are valid
95
+ # @return true if the model is valid
96
+ def valid?
97
+ true
98
+ end
99
+
100
+ # Checks equality by comparing each attribute.
101
+ # @param [Object] Object to be compared
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ type == o.type &&
106
+ title == o.title &&
107
+ code == o.code &&
108
+ status == o.status
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [type, title, code, status].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ new.build_from_hash(attributes)
128
+ end
129
+
130
+ # Builds the object from hash
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ # @return [Object] Returns the model itself
133
+ def build_from_hash(attributes)
134
+ return nil unless attributes.is_a?(Hash)
135
+ self.class.fastly_types.each_pair do |key, type|
136
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
137
+ self.send("#{key}=", nil)
138
+ elsif type =~ /\AArray<(.*)>/i
139
+ # check to ensure the input is an array given that the attribute
140
+ # is documented as an array but the input is not
141
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
142
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
143
+ end
144
+ elsif !attributes[self.class.attribute_map[key]].nil?
145
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
146
+ end
147
+ end
148
+
149
+ self
150
+ end
151
+
152
+ # Deserializes the data based on type
153
+ # @param string type Data type
154
+ # @param string value Value to be deserialized
155
+ # @return [Object] Deserialized data
156
+ def _deserialize(type, value)
157
+ case type.to_sym
158
+ when :Time
159
+ Time.parse(value)
160
+ when :Date
161
+ Date.parse(value)
162
+ when :String
163
+ value.to_s
164
+ when :Integer
165
+ value.to_i
166
+ when :Float
167
+ value.to_f
168
+ when :Boolean
169
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
170
+ true
171
+ else
172
+ false
173
+ end
174
+ when :Object
175
+ # generic object (usually a Hash), return directly
176
+ value
177
+ when /\AArray<(?<inner_type>.+)>\z/
178
+ inner_type = Regexp.last_match[:inner_type]
179
+ value.map { |v| _deserialize(inner_type, v) }
180
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
181
+ k_type = Regexp.last_match[:k_type]
182
+ v_type = Regexp.last_match[:v_type]
183
+ {}.tap do |hash|
184
+ value.each do |k, v|
185
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
186
+ end
187
+ end
188
+ else # model
189
+ # models (e.g. Pet) or oneOf
190
+ klass = Fastly.const_get(type)
191
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
192
+ end
193
+ end
194
+
195
+ # Returns the string representation of the object
196
+ # @return [String] String presentation of the object
197
+ def to_s
198
+ to_hash.to_s
199
+ end
200
+
201
+ # to_body is an alias to to_hash (backward compatibility)
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_body
204
+ to_hash
205
+ end
206
+
207
+ # Returns the object in the form of hash
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_hash
210
+ hash = {}
211
+ self.class.attribute_map.each_pair do |attr, param|
212
+ value = self.send(attr)
213
+ if value.nil?
214
+ is_nullable = self.class.fastly_nullable.include?(attr)
215
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
216
+ end
217
+
218
+ hash[param] = _to_hash(value)
219
+ end
220
+ hash
221
+ end
222
+
223
+ # Outputs non-array value in the form of hash
224
+ # For object, use to_hash. Otherwise, just return the value
225
+ # @param [Object] value Any valid value
226
+ # @return [Hash] Returns the value in the form of hash
227
+ def _to_hash(value)
228
+ if value.is_a?(Array)
229
+ value.compact.map { |v| _to_hash(v) }
230
+ elsif value.is_a?(Hash)
231
+ {}.tap do |hash|
232
+ value.each { |k, v| hash[k] = _to_hash(v) }
233
+ end
234
+ elsif value.respond_to? :to_hash
235
+ value.to_hash
236
+ else
237
+ value
238
+ end
239
+ end
240
+
241
+ end
242
+
243
+ end
@@ -0,0 +1,225 @@
1
+ =begin
2
+ #Fastly API
3
+
4
+ #Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: oss@fastly.com
8
+
9
+ =end
10
+
11
+ require 'date'
12
+ require 'time'
13
+
14
+ module Fastly
15
+ class ErrorResponseData
16
+ attr_accessor :title
17
+
18
+ attr_accessor :detail
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'title' => :'title',
24
+ :'detail' => :'detail'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.fastly_types
35
+ {
36
+ :'title' => :'String',
37
+ :'detail' => :'String'
38
+ }
39
+ end
40
+
41
+ # List of attributes with nullable: true
42
+ def self.fastly_nullable
43
+ Set.new([
44
+ ])
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ if (!attributes.is_a?(Hash))
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ErrorResponseData` initialize method"
52
+ end
53
+
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ErrorResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ end
59
+ h[k.to_sym] = v
60
+ }
61
+
62
+ if attributes.key?(:'title')
63
+ self.title = attributes[:'title']
64
+ end
65
+
66
+ if attributes.key?(:'detail')
67
+ self.detail = attributes[:'detail']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ invalid_properties = Array.new
75
+ invalid_properties
76
+ end
77
+
78
+ # Check to see if the all the properties in the model are valid
79
+ # @return true if the model is valid
80
+ def valid?
81
+ true
82
+ end
83
+
84
+ # Checks equality by comparing each attribute.
85
+ # @param [Object] Object to be compared
86
+ def ==(o)
87
+ return true if self.equal?(o)
88
+ self.class == o.class &&
89
+ title == o.title &&
90
+ detail == o.detail
91
+ end
92
+
93
+ # @see the `==` method
94
+ # @param [Object] Object to be compared
95
+ def eql?(o)
96
+ self == o
97
+ end
98
+
99
+ # Calculates hash code according to all attributes.
100
+ # @return [Integer] Hash code
101
+ def hash
102
+ [title, detail].hash
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def self.build_from_hash(attributes)
109
+ new.build_from_hash(attributes)
110
+ end
111
+
112
+ # Builds the object from hash
113
+ # @param [Hash] attributes Model attributes in the form of hash
114
+ # @return [Object] Returns the model itself
115
+ def build_from_hash(attributes)
116
+ return nil unless attributes.is_a?(Hash)
117
+ self.class.fastly_types.each_pair do |key, type|
118
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
119
+ self.send("#{key}=", nil)
120
+ elsif type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
124
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
125
+ end
126
+ elsif !attributes[self.class.attribute_map[key]].nil?
127
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
+ end
129
+ end
130
+
131
+ self
132
+ end
133
+
134
+ # Deserializes the data based on type
135
+ # @param string type Data type
136
+ # @param string value Value to be deserialized
137
+ # @return [Object] Deserialized data
138
+ def _deserialize(type, value)
139
+ case type.to_sym
140
+ when :Time
141
+ Time.parse(value)
142
+ when :Date
143
+ Date.parse(value)
144
+ when :String
145
+ value.to_s
146
+ when :Integer
147
+ value.to_i
148
+ when :Float
149
+ value.to_f
150
+ when :Boolean
151
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
+ true
153
+ else
154
+ false
155
+ end
156
+ when :Object
157
+ # generic object (usually a Hash), return directly
158
+ value
159
+ when /\AArray<(?<inner_type>.+)>\z/
160
+ inner_type = Regexp.last_match[:inner_type]
161
+ value.map { |v| _deserialize(inner_type, v) }
162
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
+ k_type = Regexp.last_match[:k_type]
164
+ v_type = Regexp.last_match[:v_type]
165
+ {}.tap do |hash|
166
+ value.each do |k, v|
167
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
+ end
169
+ end
170
+ else # model
171
+ # models (e.g. Pet) or oneOf
172
+ klass = Fastly.const_get(type)
173
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
174
+ end
175
+ end
176
+
177
+ # Returns the string representation of the object
178
+ # @return [String] String presentation of the object
179
+ def to_s
180
+ to_hash.to_s
181
+ end
182
+
183
+ # to_body is an alias to to_hash (backward compatibility)
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_body
186
+ to_hash
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ if value.nil?
196
+ is_nullable = self.class.fastly_nullable.include?(attr)
197
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
198
+ end
199
+
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ # Outputs non-array value in the form of hash
206
+ # For object, use to_hash. Otherwise, just return the value
207
+ # @param [Object] value Any valid value
208
+ # @return [Hash] Returns the value in the form of hash
209
+ def _to_hash(value)
210
+ if value.is_a?(Array)
211
+ value.compact.map { |v| _to_hash(v) }
212
+ elsif value.is_a?(Hash)
213
+ {}.tap do |hash|
214
+ value.each { |k, v| hash[k] = _to_hash(v) }
215
+ end
216
+ elsif value.respond_to? :to_hash
217
+ value.to_hash
218
+ else
219
+ value
220
+ end
221
+ end
222
+
223
+ end
224
+
225
+ end
@@ -173,7 +173,7 @@ module Fastly
173
173
  # Check to see if the all the properties in the model are valid
174
174
  # @return true if the model is valid
175
175
  def valid?
176
- event_type_validator = EnumAttributeValidator.new('String', ["api_key.create", "acl.create", "acl.delete", "acl.update", "address.create", "address.delete", "address.update", "backend.create", "backend.delete", "backend.update", "billing.contact_update", "cache_settings.create", "cache_settings.delete", "cache_settings.update", "customer.create", "customer.pricing", "customer.update", "customer_feature.create", "customer_feature.delete", "director.create", "director.delete", "director.update", "director_backend.create", "director_backend.delete", "domain.create", "domain.delete", "domain.update", "gzip.create", "gzip.delete", "gzip.update", "header.create", "header.delete", "header.update", "healthcheck.create", "healthcheck.delete", "healthcheck.update", "invitation.accept", "invitation.sent", "invoice.failed_payment", "invoice.payment", "io_settings.create", "io_settings.delete", "io_settings.update", "logging.create", "logging.delete", "logging.update", "pool.create", "pool.delete", "pool.update", "request_settings.create", "request_settings.delete", "request_settings.update", "response_object.create", "response_object.delete", "response_object.update", "rule_status.update", "rule_status.upsert", "server.create", "server.delete", "server.update", "service.create", "service.delete", "service.move", "service.move_destination", "service.move_source", "service.purge_all", "service.update", "service_authorization.create", "service_authorization.delete", "service_authorization.update", "tls.bulk_certificate.create", "tls.bulk_certificate.delete", "tls.bulk_certificate.update", "tls.certificate.create", "tls.certificate.expiration_email", "tls.certificate.update", "tls.certificate.delete", "tls.configuration.update", "tls.private_key.create", "tls.private_key.delete", "tls.activation.enable", "tls.activation.update", "tls.activation.disable", "tls.globalsign.domain.create", "tls.globalsign.domain.verify", "tls.globalsign.domain.delete", "tls.subscription.create", "tls.subscription.delete", "tls.subscription.dns_check_email", "token.create", "token.destroy", "two_factor_auth.disable", "two_factor_auth.enable", "user.create", "user.destroy", "user.lock", "user.login", "user.login_failure", "user.logout", "user.password_update", "user.unlock", "user.update", "vcl.create", "vcl.delete", "vcl.update", "version.activate", "version.clone", "version.copy", "version.copy_destination", "version.copy_source", "version.create", "version.deactivate", "version.lock", "version.update", "waf.configuration_set_update", "waf.create", "waf.delete", "waf.update", "waf.enable", "waf.disable", "waf.owasp.create", "waf.owasp.update", "waf.ruleset.deploy", "waf.ruleset.deploy_failure", "wordpress.create", "wordpress.delete", "wordpress.update"])
176
+ event_type_validator = EnumAttributeValidator.new('String', ["api_key.create", "acl.create", "acl.delete", "acl.update", "address.create", "address.delete", "address.update", "alerts.definition.create", "alerts.definition.delete", "alerts.definition.test", "alerts.definition.update", "backend.create", "backend.delete", "backend.update", "billing.contact_update", "cache_settings.create", "cache_settings.delete", "cache_settings.update", "customer.create", "customer.pricing", "customer.update", "customer_feature.create", "customer_feature.delete", "director.create", "director.delete", "director.update", "director_backend.create", "director_backend.delete", "domain.create", "domain.delete", "domain.update", "gzip.create", "gzip.delete", "gzip.update", "header.create", "header.delete", "header.update", "healthcheck.create", "healthcheck.delete", "healthcheck.update", "invitation.accept", "invitation.sent", "invoice.failed_payment", "invoice.payment", "io_settings.create", "io_settings.delete", "io_settings.update", "logging.create", "logging.delete", "logging.update", "pool.create", "pool.delete", "pool.update", "request_settings.create", "request_settings.delete", "request_settings.update", "response_object.create", "response_object.delete", "response_object.update", "rule_status.update", "rule_status.upsert", "server.create", "server.delete", "server.update", "service.create", "service.delete", "service.move", "service.move_destination", "service.move_source", "service.purge_all", "service.update", "service_authorization.create", "service_authorization.delete", "service_authorization.update", "tls.bulk_certificate.create", "tls.bulk_certificate.delete", "tls.bulk_certificate.update", "tls.certificate.create", "tls.certificate.expiration_email", "tls.certificate.update", "tls.certificate.delete", "tls.configuration.update", "tls.private_key.create", "tls.private_key.delete", "tls.activation.enable", "tls.activation.update", "tls.activation.disable", "tls.globalsign.domain.create", "tls.globalsign.domain.verify", "tls.globalsign.domain.delete", "tls.subscription.create", "tls.subscription.delete", "tls.subscription.dns_check_email", "token.create", "token.destroy", "two_factor_auth.disable", "two_factor_auth.enable", "user.create", "user.destroy", "user.lock", "user.login", "user.login_failure", "user.logout", "user.password_update", "user.unlock", "user.update", "vcl.create", "vcl.delete", "vcl.update", "version.activate", "version.clone", "version.copy", "version.copy_destination", "version.copy_source", "version.create", "version.deactivate", "version.lock", "version.update", "waf.configuration_set_update", "waf.create", "waf.delete", "waf.update", "waf.enable", "waf.disable", "waf.owasp.create", "waf.owasp.update", "waf.ruleset.deploy", "waf.ruleset.deploy_failure", "wordpress.create", "wordpress.delete", "wordpress.update"])
177
177
  return false unless event_type_validator.valid?(@event_type)
178
178
  true
179
179
  end
@@ -181,7 +181,7 @@ module Fastly
181
181
  # Custom attribute writer method checking allowed values (enum).
182
182
  # @param [Object] event_type Object to be assigned
183
183
  def event_type=(event_type)
184
- validator = EnumAttributeValidator.new('String', ["api_key.create", "acl.create", "acl.delete", "acl.update", "address.create", "address.delete", "address.update", "backend.create", "backend.delete", "backend.update", "billing.contact_update", "cache_settings.create", "cache_settings.delete", "cache_settings.update", "customer.create", "customer.pricing", "customer.update", "customer_feature.create", "customer_feature.delete", "director.create", "director.delete", "director.update", "director_backend.create", "director_backend.delete", "domain.create", "domain.delete", "domain.update", "gzip.create", "gzip.delete", "gzip.update", "header.create", "header.delete", "header.update", "healthcheck.create", "healthcheck.delete", "healthcheck.update", "invitation.accept", "invitation.sent", "invoice.failed_payment", "invoice.payment", "io_settings.create", "io_settings.delete", "io_settings.update", "logging.create", "logging.delete", "logging.update", "pool.create", "pool.delete", "pool.update", "request_settings.create", "request_settings.delete", "request_settings.update", "response_object.create", "response_object.delete", "response_object.update", "rule_status.update", "rule_status.upsert", "server.create", "server.delete", "server.update", "service.create", "service.delete", "service.move", "service.move_destination", "service.move_source", "service.purge_all", "service.update", "service_authorization.create", "service_authorization.delete", "service_authorization.update", "tls.bulk_certificate.create", "tls.bulk_certificate.delete", "tls.bulk_certificate.update", "tls.certificate.create", "tls.certificate.expiration_email", "tls.certificate.update", "tls.certificate.delete", "tls.configuration.update", "tls.private_key.create", "tls.private_key.delete", "tls.activation.enable", "tls.activation.update", "tls.activation.disable", "tls.globalsign.domain.create", "tls.globalsign.domain.verify", "tls.globalsign.domain.delete", "tls.subscription.create", "tls.subscription.delete", "tls.subscription.dns_check_email", "token.create", "token.destroy", "two_factor_auth.disable", "two_factor_auth.enable", "user.create", "user.destroy", "user.lock", "user.login", "user.login_failure", "user.logout", "user.password_update", "user.unlock", "user.update", "vcl.create", "vcl.delete", "vcl.update", "version.activate", "version.clone", "version.copy", "version.copy_destination", "version.copy_source", "version.create", "version.deactivate", "version.lock", "version.update", "waf.configuration_set_update", "waf.create", "waf.delete", "waf.update", "waf.enable", "waf.disable", "waf.owasp.create", "waf.owasp.update", "waf.ruleset.deploy", "waf.ruleset.deploy_failure", "wordpress.create", "wordpress.delete", "wordpress.update"])
184
+ validator = EnumAttributeValidator.new('String', ["api_key.create", "acl.create", "acl.delete", "acl.update", "address.create", "address.delete", "address.update", "alerts.definition.create", "alerts.definition.delete", "alerts.definition.test", "alerts.definition.update", "backend.create", "backend.delete", "backend.update", "billing.contact_update", "cache_settings.create", "cache_settings.delete", "cache_settings.update", "customer.create", "customer.pricing", "customer.update", "customer_feature.create", "customer_feature.delete", "director.create", "director.delete", "director.update", "director_backend.create", "director_backend.delete", "domain.create", "domain.delete", "domain.update", "gzip.create", "gzip.delete", "gzip.update", "header.create", "header.delete", "header.update", "healthcheck.create", "healthcheck.delete", "healthcheck.update", "invitation.accept", "invitation.sent", "invoice.failed_payment", "invoice.payment", "io_settings.create", "io_settings.delete", "io_settings.update", "logging.create", "logging.delete", "logging.update", "pool.create", "pool.delete", "pool.update", "request_settings.create", "request_settings.delete", "request_settings.update", "response_object.create", "response_object.delete", "response_object.update", "rule_status.update", "rule_status.upsert", "server.create", "server.delete", "server.update", "service.create", "service.delete", "service.move", "service.move_destination", "service.move_source", "service.purge_all", "service.update", "service_authorization.create", "service_authorization.delete", "service_authorization.update", "tls.bulk_certificate.create", "tls.bulk_certificate.delete", "tls.bulk_certificate.update", "tls.certificate.create", "tls.certificate.expiration_email", "tls.certificate.update", "tls.certificate.delete", "tls.configuration.update", "tls.private_key.create", "tls.private_key.delete", "tls.activation.enable", "tls.activation.update", "tls.activation.disable", "tls.globalsign.domain.create", "tls.globalsign.domain.verify", "tls.globalsign.domain.delete", "tls.subscription.create", "tls.subscription.delete", "tls.subscription.dns_check_email", "token.create", "token.destroy", "two_factor_auth.disable", "two_factor_auth.enable", "user.create", "user.destroy", "user.lock", "user.login", "user.login_failure", "user.logout", "user.password_update", "user.unlock", "user.update", "vcl.create", "vcl.delete", "vcl.update", "version.activate", "version.clone", "version.copy", "version.copy_destination", "version.copy_source", "version.create", "version.deactivate", "version.lock", "version.update", "waf.configuration_set_update", "waf.create", "waf.delete", "waf.update", "waf.enable", "waf.disable", "waf.owasp.create", "waf.owasp.update", "waf.ruleset.deploy", "waf.ruleset.deploy_failure", "wordpress.create", "wordpress.delete", "wordpress.update"])
185
185
  unless validator.valid?(event_type)
186
186
  fail ArgumentError, "invalid value for \"event_type\", must be one of #{validator.allowable_values}."
187
187
  end