fastly 8.0.1 → 8.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +223 -130
  3. data/Gemfile.lock +1 -1
  4. data/README.md +19 -7
  5. data/docs/{ErrorResponse.md → AutomationTokenErrorResponse.md} +1 -1
  6. data/docs/AutomationTokensApi.md +2 -2
  7. data/docs/Backend.md +5 -1
  8. data/docs/BackendApi.md +20 -4
  9. data/docs/BackendResponse.md +5 -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/RealtimeEntryAggregated.md +22 -1
  38. data/docs/RealtimeMeasurements.md +22 -1
  39. data/docs/RelationshipCustomerCustomer.md +1 -1
  40. data/docs/Results.md +23 -0
  41. data/docs/SecretStoreApi.md +4 -2
  42. data/docs/SecretStoreItemApi.md +2 -2
  43. data/docs/ServiceDetail.md +1 -1
  44. data/docs/ServiceListResponse.md +2 -2
  45. data/docs/ServiceListResponseAllOf.md +2 -2
  46. data/docs/ServiceResponse.md +1 -1
  47. data/docs/ServiceResponseAllOf.md +1 -1
  48. data/docs/TlsConfigurationResponseAttributes.md +1 -1
  49. data/docs/TlsConfigurationResponseAttributesAllOf.md +1 -1
  50. data/docs/TlsCsr.md +10 -0
  51. data/docs/TlsCsrData.md +12 -0
  52. data/docs/TlsCsrDataAttributes.md +20 -0
  53. data/docs/TlsCsrErrorResponse.md +10 -0
  54. data/docs/TlsCsrResponse.md +10 -0
  55. data/docs/TlsCsrResponseAttributes.md +10 -0
  56. data/docs/TlsCsrResponseData.md +13 -0
  57. data/docs/TlsCsrsApi.md +52 -0
  58. data/docs/TlsSubscriptionResponseAttributes.md +1 -0
  59. data/docs/TlsSubscriptionResponseAttributesAllOf.md +1 -0
  60. data/docs/TokensApi.md +1 -1
  61. data/docs/TypeTlsCsr.md +9 -0
  62. data/docs/VclApi.md +1 -1
  63. data/docs/WafActiveRulesApi.md +1 -1
  64. data/lib/fastly/api/automation_tokens_api.rb +3 -3
  65. data/lib/fastly/api/backend_api.rb +28 -4
  66. data/lib/fastly/api/billing_invoices_api.rb +151 -0
  67. data/lib/fastly/api/director_api.rb +2 -2
  68. data/lib/fastly/api/domain_inspector_historical_api.rb +4 -4
  69. data/lib/fastly/api/kv_store_api.rb +2 -2
  70. data/lib/fastly/api/logging_scalyr_api.rb +4 -4
  71. data/lib/fastly/api/origin_inspector_historical_api.rb +4 -4
  72. data/lib/fastly/api/pool_api.rb +4 -4
  73. data/lib/fastly/api/publish_api.rb +2 -2
  74. data/lib/fastly/api/secret_store_api.rb +5 -2
  75. data/lib/fastly/api/secret_store_item_api.rb +2 -2
  76. data/lib/fastly/api/tls_csrs_api.rb +83 -0
  77. data/lib/fastly/api/tokens_api.rb +2 -2
  78. data/lib/fastly/api/vcl_api.rb +2 -2
  79. data/lib/fastly/api/waf_active_rules_api.rb +2 -2
  80. data/lib/fastly/configuration.rb +18 -0
  81. data/lib/fastly/models/{error_response.rb → automation_token_error_response.rb} +3 -3
  82. data/lib/fastly/models/backend.rb +45 -2
  83. data/lib/fastly/models/backend_response.rb +45 -2
  84. data/lib/fastly/models/director.rb +1 -1
  85. data/lib/fastly/models/director_response.rb +1 -1
  86. data/lib/fastly/models/domain_inspector_realtime_entry.rb +1 -1
  87. data/lib/fastly/models/error.rb +243 -0
  88. data/lib/fastly/models/error_response_data.rb +225 -0
  89. data/lib/fastly/models/event_attributes.rb +2 -2
  90. data/lib/fastly/models/invoice.rb +298 -0
  91. data/lib/fastly/models/invoice_response.rb +305 -0
  92. data/lib/fastly/models/invoicelineitems.rb +297 -0
  93. data/lib/fastly/models/list_invoices_response.rb +234 -0
  94. data/lib/fastly/models/listinvoices.rb +227 -0
  95. data/lib/fastly/models/logging_scalyr_additional.rb +1 -1
  96. data/lib/fastly/models/logging_scalyr_response.rb +1 -1
  97. data/lib/fastly/models/metadata.rb +250 -0
  98. data/lib/fastly/models/origin_inspector_realtime_entry.rb +1 -1
  99. data/lib/fastly/models/pool_additional.rb +1 -1
  100. data/lib/fastly/models/pool_response.rb +1 -1
  101. data/lib/fastly/models/pool_response_post.rb +1 -1
  102. data/lib/fastly/models/pop.rb +2 -2
  103. data/lib/fastly/models/realtime_entry.rb +1 -1
  104. data/lib/fastly/models/realtime_entry_aggregated.rb +215 -5
  105. data/lib/fastly/models/realtime_measurements.rb +215 -5
  106. data/lib/fastly/models/relationship_customer_customer.rb +2 -4
  107. data/lib/fastly/models/relationship_tls_certificate.rb +1 -1
  108. data/lib/fastly/models/relationship_tls_configuration.rb +1 -1
  109. data/lib/fastly/models/request_settings_additional.rb +1 -0
  110. data/lib/fastly/models/request_settings_response.rb +6 -0
  111. data/lib/fastly/models/request_settings_response_all_of.rb +5 -0
  112. data/lib/fastly/models/results.rb +231 -1
  113. data/lib/fastly/models/service_detail.rb +1 -1
  114. data/lib/fastly/models/service_list_response.rb +2 -2
  115. data/lib/fastly/models/service_list_response_all_of.rb +2 -2
  116. data/lib/fastly/models/service_response.rb +1 -1
  117. data/lib/fastly/models/service_response_all_of.rb +1 -1
  118. data/lib/fastly/models/tls_configuration_response_attributes.rb +1 -1
  119. data/lib/fastly/models/tls_configuration_response_attributes_all_of.rb +1 -1
  120. data/lib/fastly/models/tls_csr.rb +216 -0
  121. data/lib/fastly/models/tls_csr_data.rb +236 -0
  122. data/lib/fastly/models/tls_csr_data_attributes.rb +358 -0
  123. data/lib/fastly/models/tls_csr_error_response.rb +218 -0
  124. data/lib/fastly/models/tls_csr_response.rb +216 -0
  125. data/lib/fastly/models/tls_csr_response_attributes.rb +217 -0
  126. data/lib/fastly/models/tls_csr_response_data.rb +245 -0
  127. data/lib/fastly/models/tls_subscription_data_attributes.rb +2 -2
  128. data/lib/fastly/models/tls_subscription_response_attributes.rb +14 -4
  129. data/lib/fastly/models/tls_subscription_response_attributes_all_of.rb +14 -4
  130. data/lib/fastly/models/type_tls_csr.rb +34 -0
  131. data/lib/fastly/version.rb +1 -1
  132. data/lib/fastly.rb +19 -1
  133. data/sig.json +1 -1
  134. metadata +41 -5
@@ -259,7 +259,7 @@ module Fastly
259
259
  end
260
260
 
261
261
  # Get boilerplate VCL
262
- # Return boilerplate VCL with the service's TTL from the [settings](/reference/api/vcl-services/settings/).
262
+ # Return boilerplate VCL with the service's TTL from the [settings](https://www.fastly.com/documentation/reference/api/vcl-services/settings/).
263
263
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
264
264
  # @option opts [Integer] :version_id Integer identifying a service version. (required)
265
265
  # @return [String]
@@ -269,7 +269,7 @@ module Fastly
269
269
  end
270
270
 
271
271
  # Get boilerplate VCL
272
- # Return boilerplate VCL with the service's TTL from the [settings](/reference/api/vcl-services/settings/).
272
+ # Return boilerplate VCL with the service's TTL from the [settings](https://www.fastly.com/documentation/reference/api/vcl-services/settings/).
273
273
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
274
274
  # @option opts [Integer] :version_id Integer identifying a service version. (required)
275
275
  # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
@@ -93,7 +93,7 @@ module Fastly
93
93
  end
94
94
 
95
95
  # Update multiple active rules
96
- # Bulk update all active rules on a [firewall version](https://developer.fastly.com/reference/api/waf/firewall-version/). This endpoint will not add new active rules, only update existing active rules.
96
+ # Bulk update all active rules on a [firewall version](https://www.fastly.com/documentation/reference/api/waf/firewall-version/). This endpoint will not add new active rules, only update existing active rules.
97
97
  # @option opts [String] :firewall_id Alphanumeric string identifying a WAF Firewall. (required)
98
98
  # @option opts [Integer] :version_id Integer identifying a service version. (required)
99
99
  # @option opts [WafActiveRuleData] :body
@@ -104,7 +104,7 @@ module Fastly
104
104
  end
105
105
 
106
106
  # Update multiple active rules
107
- # Bulk update all active rules on a [firewall version](https://developer.fastly.com/reference/api/waf/firewall-version/). This endpoint will not add new active rules, only update existing active rules.
107
+ # Bulk update all active rules on a [firewall version](https://www.fastly.com/documentation/reference/api/waf/firewall-version/). This endpoint will not add new active rules, only update existing active rules.
108
108
  # @option opts [String] :firewall_id Alphanumeric string identifying a WAF Firewall. (required)
109
109
  # @option opts [Integer] :version_id Integer identifying a service version. (required)
110
110
  # @option opts [WafActiveRuleData] :body
@@ -476,6 +476,18 @@ module Fastly
476
476
  description: "No description provided",
477
477
  }
478
478
  ],
479
+ "BillingInvoicesApi.get_invoice_by_invoice_id": [
480
+ {
481
+ url: "https://api.fastly.com",
482
+ description: "No description provided",
483
+ }
484
+ ],
485
+ "BillingInvoicesApi.list_invoices": [
486
+ {
487
+ url: "https://api.fastly.com",
488
+ description: "No description provided",
489
+ }
490
+ ],
479
491
  "CacheSettingsApi.create_cache_settings": [
480
492
  {
481
493
  url: "https://api.fastly.com",
@@ -2966,6 +2978,12 @@ module Fastly
2966
2978
  description: "No description provided",
2967
2979
  }
2968
2980
  ],
2981
+ "TlsCsrsApi.create_csr": [
2982
+ {
2983
+ url: "https://api.fastly.com",
2984
+ description: "No description provided",
2985
+ }
2986
+ ],
2969
2987
  "TlsDomainsApi.list_tls_domains": [
2970
2988
  {
2971
2989
  url: "https://api.fastly.com",
@@ -12,7 +12,7 @@ require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Fastly
15
- class ErrorResponse
15
+ class AutomationTokenErrorResponse
16
16
  attr_accessor :detail
17
17
 
18
18
  attr_accessor :errors
@@ -56,13 +56,13 @@ module Fastly
56
56
  # @param [Hash] attributes Model attributes in the form of hash
57
57
  def initialize(attributes = {})
58
58
  if (!attributes.is_a?(Hash))
59
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ErrorResponse` initialize method"
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::AutomationTokenErrorResponse` initialize method"
60
60
  end
61
61
 
62
62
  # check to see if the attribute exists and convert string to symbol for hash key
63
63
  attributes = attributes.each_with_object({}) { |(k, v), h|
64
64
  if (!self.class.attribute_map.key?(k.to_sym))
65
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::AutomationTokenErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
66
  end
67
67
  h[k.to_sym] = v
68
68
  }
@@ -85,7 +85,7 @@ module Fastly
85
85
  # Be strict on checking SSL certs.
86
86
  attr_accessor :ssl_check_cert
87
87
 
88
- # List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated.
88
+ # List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated.
89
89
  attr_accessor :ssl_ciphers
90
90
 
91
91
  # Client certificate attached to origin.
@@ -100,6 +100,18 @@ module Fastly
100
100
  # Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all.
101
101
  attr_accessor :ssl_sni_hostname
102
102
 
103
+ # Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified.
104
+ attr_accessor :tcp_keepalive_enable
105
+
106
+ # Interval in seconds between subsequent keepalive probes.
107
+ attr_accessor :tcp_keepalive_interval
108
+
109
+ # Number of unacknowledged probes to send before considering the connection dead.
110
+ attr_accessor :tcp_keepalive_probes
111
+
112
+ # Interval in seconds between the last data packet sent and the first keepalive probe.
113
+ attr_accessor :tcp_keepalive_time
114
+
103
115
  # Whether or not to require TLS for connections to this backend.
104
116
  attr_accessor :use_ssl
105
117
 
@@ -138,6 +150,10 @@ module Fastly
138
150
  :'ssl_client_key' => :'ssl_client_key',
139
151
  :'ssl_hostname' => :'ssl_hostname',
140
152
  :'ssl_sni_hostname' => :'ssl_sni_hostname',
153
+ :'tcp_keepalive_enable' => :'tcp_keepalive_enable',
154
+ :'tcp_keepalive_interval' => :'tcp_keepalive_interval',
155
+ :'tcp_keepalive_probes' => :'tcp_keepalive_probes',
156
+ :'tcp_keepalive_time' => :'tcp_keepalive_time',
141
157
  :'use_ssl' => :'use_ssl',
142
158
  :'weight' => :'weight'
143
159
  }
@@ -180,6 +196,10 @@ module Fastly
180
196
  :'ssl_client_key' => :'String',
181
197
  :'ssl_hostname' => :'String',
182
198
  :'ssl_sni_hostname' => :'String',
199
+ :'tcp_keepalive_enable' => :'Boolean',
200
+ :'tcp_keepalive_interval' => :'Integer',
201
+ :'tcp_keepalive_probes' => :'Integer',
202
+ :'tcp_keepalive_time' => :'Integer',
183
203
  :'use_ssl' => :'Boolean',
184
204
  :'weight' => :'Integer'
185
205
  }
@@ -208,6 +228,9 @@ module Fastly
208
228
  :'ssl_client_key',
209
229
  :'ssl_hostname',
210
230
  :'ssl_sni_hostname',
231
+ :'tcp_keepalive_interval',
232
+ :'tcp_keepalive_probes',
233
+ :'tcp_keepalive_time',
211
234
  ])
212
235
  end
213
236
 
@@ -344,6 +367,22 @@ module Fastly
344
367
  self.ssl_sni_hostname = attributes[:'ssl_sni_hostname']
345
368
  end
346
369
 
370
+ if attributes.key?(:'tcp_keepalive_enable')
371
+ self.tcp_keepalive_enable = attributes[:'tcp_keepalive_enable']
372
+ end
373
+
374
+ if attributes.key?(:'tcp_keepalive_interval')
375
+ self.tcp_keepalive_interval = attributes[:'tcp_keepalive_interval']
376
+ end
377
+
378
+ if attributes.key?(:'tcp_keepalive_probes')
379
+ self.tcp_keepalive_probes = attributes[:'tcp_keepalive_probes']
380
+ end
381
+
382
+ if attributes.key?(:'tcp_keepalive_time')
383
+ self.tcp_keepalive_time = attributes[:'tcp_keepalive_time']
384
+ end
385
+
347
386
  if attributes.key?(:'use_ssl')
348
387
  self.use_ssl = attributes[:'use_ssl']
349
388
  end
@@ -417,6 +456,10 @@ module Fastly
417
456
  ssl_client_key == o.ssl_client_key &&
418
457
  ssl_hostname == o.ssl_hostname &&
419
458
  ssl_sni_hostname == o.ssl_sni_hostname &&
459
+ tcp_keepalive_enable == o.tcp_keepalive_enable &&
460
+ tcp_keepalive_interval == o.tcp_keepalive_interval &&
461
+ tcp_keepalive_probes == o.tcp_keepalive_probes &&
462
+ tcp_keepalive_time == o.tcp_keepalive_time &&
420
463
  use_ssl == o.use_ssl &&
421
464
  weight == o.weight
422
465
  end
@@ -430,7 +473,7 @@ module Fastly
430
473
  # Calculates hash code according to all attributes.
431
474
  # @return [Integer] Hash code
432
475
  def hash
433
- [address, auto_loadbalance, between_bytes_timeout, client_cert, comment, connect_timeout, first_byte_timeout, healthcheck, hostname, ipv4, ipv6, keepalive_time, max_conn, max_tls_version, min_tls_version, name, override_host, port, request_condition, share_key, shield, ssl_ca_cert, ssl_cert_hostname, ssl_check_cert, ssl_ciphers, ssl_client_cert, ssl_client_key, ssl_hostname, ssl_sni_hostname, use_ssl, weight].hash
476
+ [address, auto_loadbalance, between_bytes_timeout, client_cert, comment, connect_timeout, first_byte_timeout, healthcheck, hostname, ipv4, ipv6, keepalive_time, max_conn, max_tls_version, min_tls_version, name, override_host, port, request_condition, share_key, shield, ssl_ca_cert, ssl_cert_hostname, ssl_check_cert, ssl_ciphers, ssl_client_cert, ssl_client_key, ssl_hostname, ssl_sni_hostname, tcp_keepalive_enable, tcp_keepalive_interval, tcp_keepalive_probes, tcp_keepalive_time, use_ssl, weight].hash
434
477
  end
435
478
 
436
479
  # Builds the object from hash
@@ -85,7 +85,7 @@ module Fastly
85
85
  # Be strict on checking SSL certs.
86
86
  attr_accessor :ssl_check_cert
87
87
 
88
- # List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated.
88
+ # List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated.
89
89
  attr_accessor :ssl_ciphers
90
90
 
91
91
  # Client certificate attached to origin.
@@ -100,6 +100,18 @@ module Fastly
100
100
  # Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all.
101
101
  attr_accessor :ssl_sni_hostname
102
102
 
103
+ # Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified.
104
+ attr_accessor :tcp_keepalive_enable
105
+
106
+ # Interval in seconds between subsequent keepalive probes.
107
+ attr_accessor :tcp_keepalive_interval
108
+
109
+ # Number of unacknowledged probes to send before considering the connection dead.
110
+ attr_accessor :tcp_keepalive_probes
111
+
112
+ # Interval in seconds between the last data packet sent and the first keepalive probe.
113
+ attr_accessor :tcp_keepalive_time
114
+
103
115
  # Whether or not to require TLS for connections to this backend.
104
116
  attr_accessor :use_ssl
105
117
 
@@ -154,6 +166,10 @@ module Fastly
154
166
  :'ssl_client_key' => :'ssl_client_key',
155
167
  :'ssl_hostname' => :'ssl_hostname',
156
168
  :'ssl_sni_hostname' => :'ssl_sni_hostname',
169
+ :'tcp_keepalive_enable' => :'tcp_keepalive_enable',
170
+ :'tcp_keepalive_interval' => :'tcp_keepalive_interval',
171
+ :'tcp_keepalive_probes' => :'tcp_keepalive_probes',
172
+ :'tcp_keepalive_time' => :'tcp_keepalive_time',
157
173
  :'use_ssl' => :'use_ssl',
158
174
  :'weight' => :'weight',
159
175
  :'created_at' => :'created_at',
@@ -202,6 +218,10 @@ module Fastly
202
218
  :'ssl_client_key' => :'String',
203
219
  :'ssl_hostname' => :'String',
204
220
  :'ssl_sni_hostname' => :'String',
221
+ :'tcp_keepalive_enable' => :'Boolean',
222
+ :'tcp_keepalive_interval' => :'Integer',
223
+ :'tcp_keepalive_probes' => :'Integer',
224
+ :'tcp_keepalive_time' => :'Integer',
205
225
  :'use_ssl' => :'Boolean',
206
226
  :'weight' => :'Integer',
207
227
  :'created_at' => :'Time',
@@ -236,6 +256,9 @@ module Fastly
236
256
  :'ssl_client_key',
237
257
  :'ssl_hostname',
238
258
  :'ssl_sni_hostname',
259
+ :'tcp_keepalive_interval',
260
+ :'tcp_keepalive_probes',
261
+ :'tcp_keepalive_time',
239
262
  :'created_at',
240
263
  :'deleted_at',
241
264
  :'updated_at',
@@ -385,6 +408,22 @@ module Fastly
385
408
  self.ssl_sni_hostname = attributes[:'ssl_sni_hostname']
386
409
  end
387
410
 
411
+ if attributes.key?(:'tcp_keepalive_enable')
412
+ self.tcp_keepalive_enable = attributes[:'tcp_keepalive_enable']
413
+ end
414
+
415
+ if attributes.key?(:'tcp_keepalive_interval')
416
+ self.tcp_keepalive_interval = attributes[:'tcp_keepalive_interval']
417
+ end
418
+
419
+ if attributes.key?(:'tcp_keepalive_probes')
420
+ self.tcp_keepalive_probes = attributes[:'tcp_keepalive_probes']
421
+ end
422
+
423
+ if attributes.key?(:'tcp_keepalive_time')
424
+ self.tcp_keepalive_time = attributes[:'tcp_keepalive_time']
425
+ end
426
+
388
427
  if attributes.key?(:'use_ssl')
389
428
  self.use_ssl = attributes[:'use_ssl']
390
429
  end
@@ -482,6 +521,10 @@ module Fastly
482
521
  ssl_client_key == o.ssl_client_key &&
483
522
  ssl_hostname == o.ssl_hostname &&
484
523
  ssl_sni_hostname == o.ssl_sni_hostname &&
524
+ tcp_keepalive_enable == o.tcp_keepalive_enable &&
525
+ tcp_keepalive_interval == o.tcp_keepalive_interval &&
526
+ tcp_keepalive_probes == o.tcp_keepalive_probes &&
527
+ tcp_keepalive_time == o.tcp_keepalive_time &&
485
528
  use_ssl == o.use_ssl &&
486
529
  weight == o.weight &&
487
530
  created_at == o.created_at &&
@@ -501,7 +544,7 @@ module Fastly
501
544
  # Calculates hash code according to all attributes.
502
545
  # @return [Integer] Hash code
503
546
  def hash
504
- [address, auto_loadbalance, between_bytes_timeout, client_cert, comment, connect_timeout, first_byte_timeout, healthcheck, hostname, ipv4, ipv6, keepalive_time, max_conn, max_tls_version, min_tls_version, name, override_host, port, request_condition, share_key, shield, ssl_ca_cert, ssl_cert_hostname, ssl_check_cert, ssl_ciphers, ssl_client_cert, ssl_client_key, ssl_hostname, ssl_sni_hostname, use_ssl, weight, created_at, deleted_at, updated_at, service_id, version, locked].hash
547
+ [address, auto_loadbalance, between_bytes_timeout, client_cert, comment, connect_timeout, first_byte_timeout, healthcheck, hostname, ipv4, ipv6, keepalive_time, max_conn, max_tls_version, min_tls_version, name, override_host, port, request_condition, share_key, shield, ssl_ca_cert, ssl_cert_hostname, ssl_check_cert, ssl_ciphers, ssl_client_cert, ssl_client_key, ssl_hostname, ssl_sni_hostname, tcp_keepalive_enable, tcp_keepalive_interval, tcp_keepalive_probes, tcp_keepalive_time, use_ssl, weight, created_at, deleted_at, updated_at, service_id, version, locked].hash
505
548
  end
506
549
 
507
550
  # Builds the object from hash
@@ -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.
@@ -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