fastly 4.0.1.pre.alpha.0 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,217 @@
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 Store
16
+ # A human-readable name for the store.
17
+ attr_accessor :name
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'name' => :'name'
23
+ }
24
+ end
25
+
26
+ # Returns all the JSON keys this model knows about
27
+ def self.acceptable_attributes
28
+ attribute_map.values
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.fastly_types
33
+ {
34
+ :'name' => :'String'
35
+ }
36
+ end
37
+
38
+ # List of attributes with nullable: true
39
+ def self.fastly_nullable
40
+ Set.new([
41
+ ])
42
+ end
43
+
44
+ # Initializes the object
45
+ # @param [Hash] attributes Model attributes in the form of hash
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::Store` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::Store`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'name')
60
+ self.name = attributes[:'name']
61
+ end
62
+ end
63
+
64
+ # Show invalid properties with the reasons. Usually used together with valid?
65
+ # @return Array for valid properties with the reasons
66
+ def list_invalid_properties
67
+ invalid_properties = Array.new
68
+ invalid_properties
69
+ end
70
+
71
+ # Check to see if the all the properties in the model are valid
72
+ # @return true if the model is valid
73
+ def valid?
74
+ true
75
+ end
76
+
77
+ # Checks equality by comparing each attribute.
78
+ # @param [Object] Object to be compared
79
+ def ==(o)
80
+ return true if self.equal?(o)
81
+ self.class == o.class &&
82
+ name == o.name
83
+ end
84
+
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ def hash
94
+ [name].hash
95
+ end
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def self.build_from_hash(attributes)
101
+ new.build_from_hash(attributes)
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ self.class.fastly_types.each_pair do |key, type|
110
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
111
+ self.send("#{key}=", nil)
112
+ elsif type =~ /\AArray<(.*)>/i
113
+ # check to ensure the input is an array given that the attribute
114
+ # is documented as an array but the input is not
115
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
116
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
117
+ end
118
+ elsif !attributes[self.class.attribute_map[key]].nil?
119
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
+ end
121
+ end
122
+
123
+ self
124
+ end
125
+
126
+ # Deserializes the data based on type
127
+ # @param string type Data type
128
+ # @param string value Value to be deserialized
129
+ # @return [Object] Deserialized data
130
+ def _deserialize(type, value)
131
+ case type.to_sym
132
+ when :Time
133
+ Time.parse(value)
134
+ when :Date
135
+ Date.parse(value)
136
+ when :String
137
+ value.to_s
138
+ when :Integer
139
+ value.to_i
140
+ when :Float
141
+ value.to_f
142
+ when :Boolean
143
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
144
+ true
145
+ else
146
+ false
147
+ end
148
+ when :Object
149
+ # generic object (usually a Hash), return directly
150
+ value
151
+ when /\AArray<(?<inner_type>.+)>\z/
152
+ inner_type = Regexp.last_match[:inner_type]
153
+ value.map { |v| _deserialize(inner_type, v) }
154
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
+ k_type = Regexp.last_match[:k_type]
156
+ v_type = Regexp.last_match[:v_type]
157
+ {}.tap do |hash|
158
+ value.each do |k, v|
159
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
+ end
161
+ end
162
+ else # model
163
+ # models (e.g. Pet) or oneOf
164
+ klass = Fastly.const_get(type)
165
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
166
+ end
167
+ end
168
+
169
+ # Returns the string representation of the object
170
+ # @return [String] String presentation of the object
171
+ def to_s
172
+ to_hash.to_s
173
+ end
174
+
175
+ # to_body is an alias to to_hash (backward compatibility)
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_body
178
+ to_hash
179
+ end
180
+
181
+ # Returns the object in the form of hash
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_hash
184
+ hash = {}
185
+ self.class.attribute_map.each_pair do |attr, param|
186
+ value = self.send(attr)
187
+ if value.nil?
188
+ is_nullable = self.class.fastly_nullable.include?(attr)
189
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
190
+ end
191
+
192
+ hash[param] = _to_hash(value)
193
+ end
194
+ hash
195
+ end
196
+
197
+ # Outputs non-array value in the form of hash
198
+ # For object, use to_hash. Otherwise, just return the value
199
+ # @param [Object] value Any valid value
200
+ # @return [Hash] Returns the value in the form of hash
201
+ def _to_hash(value)
202
+ if value.is_a?(Array)
203
+ value.compact.map { |v| _to_hash(v) }
204
+ elsif value.is_a?(Hash)
205
+ {}.tap do |hash|
206
+ value.each { |k, v| hash[k] = _to_hash(v) }
207
+ end
208
+ elsif value.respond_to? :to_hash
209
+ value.to_hash
210
+ else
211
+ value
212
+ end
213
+ end
214
+
215
+ end
216
+
217
+ end
@@ -0,0 +1,227 @@
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 StoreResponse
16
+ # ID of the store.
17
+ attr_accessor :id
18
+
19
+ # A human-readable name for the store.
20
+ attr_accessor :name
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'id' => :'id',
26
+ :'name' => :'name'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.fastly_types
37
+ {
38
+ :'id' => :'String',
39
+ :'name' => :'String'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.fastly_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::StoreResponse` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::StoreResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'id')
65
+ self.id = attributes[:'id']
66
+ end
67
+
68
+ if attributes.key?(:'name')
69
+ self.name = attributes[:'name']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ id == o.id &&
92
+ name == o.name
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [id, name].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ new.build_from_hash(attributes)
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ self.class.fastly_types.each_pair do |key, type|
120
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
121
+ self.send("#{key}=", nil)
122
+ elsif type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the attribute
124
+ # is documented as an array but the input is not
125
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
126
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
127
+ end
128
+ elsif !attributes[self.class.attribute_map[key]].nil?
129
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
+ end
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :Time
143
+ Time.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :String
147
+ value.to_s
148
+ when :Integer
149
+ value.to_i
150
+ when :Float
151
+ value.to_f
152
+ when :Boolean
153
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
+ true
155
+ else
156
+ false
157
+ end
158
+ when :Object
159
+ # generic object (usually a Hash), return directly
160
+ value
161
+ when /\AArray<(?<inner_type>.+)>\z/
162
+ inner_type = Regexp.last_match[:inner_type]
163
+ value.map { |v| _deserialize(inner_type, v) }
164
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
+ k_type = Regexp.last_match[:k_type]
166
+ v_type = Regexp.last_match[:v_type]
167
+ {}.tap do |hash|
168
+ value.each do |k, v|
169
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
+ end
171
+ end
172
+ else # model
173
+ # models (e.g. Pet) or oneOf
174
+ klass = Fastly.const_get(type)
175
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
176
+ end
177
+ end
178
+
179
+ # Returns the string representation of the object
180
+ # @return [String] String presentation of the object
181
+ def to_s
182
+ to_hash.to_s
183
+ end
184
+
185
+ # to_body is an alias to to_hash (backward compatibility)
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_body
188
+ to_hash
189
+ end
190
+
191
+ # Returns the object in the form of hash
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_hash
194
+ hash = {}
195
+ self.class.attribute_map.each_pair do |attr, param|
196
+ value = self.send(attr)
197
+ if value.nil?
198
+ is_nullable = self.class.fastly_nullable.include?(attr)
199
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
200
+ end
201
+
202
+ hash[param] = _to_hash(value)
203
+ end
204
+ hash
205
+ end
206
+
207
+ # Outputs non-array value in the form of hash
208
+ # For object, use to_hash. Otherwise, just return the value
209
+ # @param [Object] value Any valid value
210
+ # @return [Hash] Returns the value in the form of hash
211
+ def _to_hash(value)
212
+ if value.is_a?(Array)
213
+ value.compact.map { |v| _to_hash(v) }
214
+ elsif value.is_a?(Hash)
215
+ {}.tap do |hash|
216
+ value.each { |k, v| hash[k] = _to_hash(v) }
217
+ end
218
+ elsif value.respond_to? :to_hash
219
+ value.to_hash
220
+ else
221
+ value
222
+ end
223
+ end
224
+
225
+ end
226
+
227
+ end
@@ -9,5 +9,5 @@ Contact: oss@fastly.com
9
9
  =end
10
10
 
11
11
  module Fastly
12
- VERSION = '4.0.1-alpha.0'
12
+ VERSION = '4.1.0'
13
13
  end
data/lib/fastly.rb CHANGED
@@ -97,6 +97,8 @@ require 'fastly/models/event_response'
97
97
  require 'fastly/models/events_response'
98
98
  require 'fastly/models/events_response_all_of'
99
99
  require 'fastly/models/generic_token_error'
100
+ require 'fastly/models/get_stores_response'
101
+ require 'fastly/models/get_stores_response_meta'
100
102
  require 'fastly/models/gzip'
101
103
  require 'fastly/models/gzip_response'
102
104
  require 'fastly/models/header'
@@ -150,6 +152,7 @@ require 'fastly/models/invitation_response_data'
150
152
  require 'fastly/models/invitation_response_data_all_of'
151
153
  require 'fastly/models/invitations_response'
152
154
  require 'fastly/models/invitations_response_all_of'
155
+ require 'fastly/models/key_response'
153
156
  require 'fastly/models/logging_address_and_port'
154
157
  require 'fastly/models/logging_azureblob'
155
158
  require 'fastly/models/logging_azureblob_all_of'
@@ -426,6 +429,8 @@ require 'fastly/models/star_data'
426
429
  require 'fastly/models/star_response'
427
430
  require 'fastly/models/star_response_all_of'
428
431
  require 'fastly/models/stats'
432
+ require 'fastly/models/store'
433
+ require 'fastly/models/store_response'
429
434
  require 'fastly/models/timestamps'
430
435
  require 'fastly/models/timestamps_no_delete'
431
436
  require 'fastly/models/tls_activation'
@@ -667,6 +672,7 @@ require 'fastly/api/logging_splunk_api'
667
672
  require 'fastly/api/logging_sumologic_api'
668
673
  require 'fastly/api/logging_syslog_api'
669
674
  require 'fastly/api/mutual_authentication_api'
675
+ require 'fastly/api/object_store_api'
670
676
  require 'fastly/api/package_api'
671
677
  require 'fastly/api/pool_api'
672
678
  require 'fastly/api/pop_api'
data/sig.json CHANGED
@@ -1 +1 @@
1
- {"G": "8b4af0da", "D": "237fa474"}
1
+ {"G": "83b1ff61", "D": "e4d025a1"}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastly
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1.pre.alpha.0
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fastly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-13 00:00:00.000000000 Z
11
+ date: 2023-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -154,6 +154,8 @@ files:
154
154
  - docs/EventsResponse.md
155
155
  - docs/EventsResponseAllOf.md
156
156
  - docs/GenericTokenError.md
157
+ - docs/GetStoresResponse.md
158
+ - docs/GetStoresResponseMeta.md
157
159
  - docs/Gzip.md
158
160
  - docs/GzipApi.md
159
161
  - docs/GzipResponse.md
@@ -217,6 +219,7 @@ files:
217
219
  - docs/InvitationsApi.md
218
220
  - docs/InvitationsResponse.md
219
221
  - docs/InvitationsResponseAllOf.md
222
+ - docs/KeyResponse.md
220
223
  - docs/LoggingAddressAndPort.md
221
224
  - docs/LoggingAzureblob.md
222
225
  - docs/LoggingAzureblobAllOf.md
@@ -340,6 +343,7 @@ files:
340
343
  - docs/MutualAuthenticationResponseDataAllOf.md
341
344
  - docs/MutualAuthenticationsResponse.md
342
345
  - docs/MutualAuthenticationsResponseAllOf.md
346
+ - docs/ObjectStoreApi.md
343
347
  - docs/Package.md
344
348
  - docs/PackageApi.md
345
349
  - docs/PackageMetadata.md
@@ -538,6 +542,8 @@ files:
538
542
  - docs/StarResponseAllOf.md
539
543
  - docs/Stats.md
540
544
  - docs/StatsApi.md
545
+ - docs/Store.md
546
+ - docs/StoreResponse.md
541
547
  - docs/Timestamps.md
542
548
  - docs/TimestampsNoDelete.md
543
549
  - docs/TlsActivation.md
@@ -799,6 +805,7 @@ files:
799
805
  - lib/fastly/api/logging_sumologic_api.rb
800
806
  - lib/fastly/api/logging_syslog_api.rb
801
807
  - lib/fastly/api/mutual_authentication_api.rb
808
+ - lib/fastly/api/object_store_api.rb
802
809
  - lib/fastly/api/package_api.rb
803
810
  - lib/fastly/api/pool_api.rb
804
811
  - lib/fastly/api/pop_api.rb
@@ -922,6 +929,8 @@ files:
922
929
  - lib/fastly/models/events_response.rb
923
930
  - lib/fastly/models/events_response_all_of.rb
924
931
  - lib/fastly/models/generic_token_error.rb
932
+ - lib/fastly/models/get_stores_response.rb
933
+ - lib/fastly/models/get_stores_response_meta.rb
925
934
  - lib/fastly/models/gzip.rb
926
935
  - lib/fastly/models/gzip_response.rb
927
936
  - lib/fastly/models/header.rb
@@ -975,6 +984,7 @@ files:
975
984
  - lib/fastly/models/invitation_response_data_all_of.rb
976
985
  - lib/fastly/models/invitations_response.rb
977
986
  - lib/fastly/models/invitations_response_all_of.rb
987
+ - lib/fastly/models/key_response.rb
978
988
  - lib/fastly/models/logging_address_and_port.rb
979
989
  - lib/fastly/models/logging_azureblob.rb
980
990
  - lib/fastly/models/logging_azureblob_all_of.rb
@@ -1251,6 +1261,8 @@ files:
1251
1261
  - lib/fastly/models/star_response.rb
1252
1262
  - lib/fastly/models/star_response_all_of.rb
1253
1263
  - lib/fastly/models/stats.rb
1264
+ - lib/fastly/models/store.rb
1265
+ - lib/fastly/models/store_response.rb
1254
1266
  - lib/fastly/models/timestamps.rb
1255
1267
  - lib/fastly/models/timestamps_no_delete.rb
1256
1268
  - lib/fastly/models/tls_activation.rb
@@ -1450,9 +1462,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1450
1462
  version: '2.4'
1451
1463
  required_rubygems_version: !ruby/object:Gem::Requirement
1452
1464
  requirements:
1453
- - - ">"
1465
+ - - ">="
1454
1466
  - !ruby/object:Gem::Version
1455
- version: 1.3.1
1467
+ version: '0'
1456
1468
  requirements: []
1457
1469
  rubygems_version: 3.3.26
1458
1470
  signing_key: