fastly 4.3.0 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,19 +0,0 @@
1
- # Fastly::TlsCsrDataAttributes
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **sans** | **Array<String>** | Subject Altername Names - An array of one or more fully qualified domain names or public IP addresses to be secured by this certificate. Required. | |
8
- | **common_name** | **String** | Common Name (CN) - The fully qualified domain name (FQDN) to be secured by this certificate. The common name should be one of the entries in the SANs parameter. | [optional] |
9
- | **country** | **String** | Country (C) - The two-letter ISO country code where the organization is located. | [optional] |
10
- | **state** | **String** | State (S) - The state, province, region, or county where the organization is located. This should not be abbreviated. | [optional] |
11
- | **city** | **String** | Locality (L) - The locality, city, town, or village where the organization is located. | [optional] |
12
- | **postal_code** | **String** | Postal Code - The postal code where the organization is located. | [optional] |
13
- | **street_address** | **String** | Street Address - The street address where the organization is located. | [optional] |
14
- | **organization** | **String** | Organization (O) - The legal name of the organization, including any suffixes. This should not be abbreviated. | [optional] |
15
- | **organizational_unit** | **String** | Organizational Unit (OU) - The internal division of the organization managing the certificate. | [optional] |
16
- | **email** | **String** | Email Address (EMAIL) - The organizational contact for this. | [optional] |
17
-
18
- [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
19
-
@@ -1,10 +0,0 @@
1
- # Fastly::TlsCsrResponse
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **data** | [**TlsCsrResponseData**](TlsCsrResponseData.md) | | [optional] |
8
-
9
- [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
10
-
@@ -1,10 +0,0 @@
1
- # Fastly::TlsCsrResponseAttributes
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **content** | **String** | The PEM encoded CSR. | [optional] |
8
-
9
- [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
10
-
@@ -1,13 +0,0 @@
1
- # Fastly::TlsCsrResponseData
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **id** | **String** | | [optional] |
8
- | **type** | [**TypeTlsCsr**](TypeTlsCsr.md) | | [optional][default to 'csr'] |
9
- | **attributes** | [**TlsCsrResponseAttributes**](TlsCsrResponseAttributes.md) | | [optional] |
10
- | **relationships** | [**RelationshipsForTlsCsr**](RelationshipsForTlsCsr.md) | | [optional] |
11
-
12
- [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
13
-
data/docs/TlsCsrsApi.md DELETED
@@ -1,52 +0,0 @@
1
- # Fastly::TlsCsrsApi
2
-
3
-
4
- ```ruby
5
- require 'fastly'
6
- api_instance = Fastly::TlsCsrsApi.new
7
- ```
8
-
9
- ## Methods
10
-
11
- | Method | HTTP request | Description |
12
- | ------ | ------------ | ----------- |
13
- | [**create_csr**](TlsCsrsApi.md#create_csr) | **POST** /tls/certificate_signing_requests | Create CSR |
14
-
15
-
16
- ## `create_csr()`
17
-
18
- ```ruby
19
- create_csr(opts): <TlsCsrResponse> # Create CSR
20
- ```
21
-
22
- Creates a certificate signing request (CSR).
23
-
24
- ### Examples
25
-
26
- ```ruby
27
- api_instance = Fastly::TlsCsrsApi.new
28
- opts = {
29
- tls_csr: Fastly::TlsCsr.new, # TlsCsr |
30
- }
31
-
32
- begin
33
- # Create CSR
34
- result = api_instance.create_csr(opts)
35
- p result
36
- rescue Fastly::ApiError => e
37
- puts "Error when calling TlsCsrsApi->create_csr: #{e}"
38
- end
39
- ```
40
-
41
- ### Options
42
-
43
- | Name | Type | Description | Notes |
44
- | ---- | ---- | ----------- | ----- |
45
- | **tls_csr** | [**TlsCsr**](TlsCsr.md) | | [optional] |
46
-
47
- ### Return type
48
-
49
- [**TlsCsrResponse**](TlsCsrResponse.md)
50
-
51
- [[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
52
- [[Back to README]](../../README.md)
data/docs/TypeTlsCsr.md DELETED
@@ -1,9 +0,0 @@
1
- # Fastly::TypeTlsCsr
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
-
8
- [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
9
-
@@ -1,83 +0,0 @@
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 'cgi'
12
-
13
- module Fastly
14
- class TlsCsrsApi
15
- attr_accessor :api_client
16
-
17
- def initialize(api_client = ApiClient.default)
18
- @api_client = api_client
19
- end
20
- # Create CSR
21
- # Creates a certificate signing request (CSR).
22
- # @option opts [TlsCsr] :tls_csr
23
- # @return [TlsCsrResponse]
24
- def create_csr(opts = {})
25
- data, _status_code, _headers = create_csr_with_http_info(opts)
26
- data
27
- end
28
-
29
- # Create CSR
30
- # Creates a certificate signing request (CSR).
31
- # @option opts [TlsCsr] :tls_csr
32
- # @return [Array<(TlsCsrResponse, Integer, Hash)>] TlsCsrResponse data, response status code and response headers
33
- def create_csr_with_http_info(opts = {})
34
- if @api_client.config.debugging
35
- @api_client.config.logger.debug 'Calling API: TlsCsrsApi.create_csr ...'
36
- end
37
- # unbox the parameters from the hash
38
- # resource path
39
- local_var_path = '/tls/certificate_signing_requests'
40
-
41
- # query parameters
42
- query_params = opts[:query_params] || {}
43
-
44
- # header parameters
45
- header_params = opts[:header_params] || {}
46
- # HTTP header 'Accept' (if needed)
47
- header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
48
- # HTTP header 'Content-Type'
49
- content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
50
- if !content_type.nil?
51
- header_params['Content-Type'] = content_type
52
- end
53
-
54
- # form parameters
55
- form_params = opts[:form_params] || {}
56
-
57
- # http body (model)
58
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'tls_csr'])
59
-
60
- # return_type
61
- return_type = opts[:debug_return_type] || 'TlsCsrResponse'
62
-
63
- # auth_names
64
- auth_names = opts[:debug_auth_names] || ['token']
65
-
66
- new_options = opts.merge(
67
- :operation => :"TlsCsrsApi.create_csr",
68
- :header_params => header_params,
69
- :query_params => query_params,
70
- :form_params => form_params,
71
- :body => post_body,
72
- :auth_names => auth_names,
73
- :return_type => return_type
74
- )
75
-
76
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
77
- if @api_client.config.debugging
78
- @api_client.config.logger.debug "API called: TlsCsrsApi#create_csr\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
- end
80
- return data, status_code, headers
81
- end
82
- end
83
- end
@@ -1,218 +0,0 @@
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 ErrorResponse
16
- attr_accessor :errors
17
-
18
- # Attribute mapping from ruby-style variable name to JSON key.
19
- def self.attribute_map
20
- {
21
- :'errors' => :'errors'
22
- }
23
- end
24
-
25
- # Returns all the JSON keys this model knows about
26
- def self.acceptable_attributes
27
- attribute_map.values
28
- end
29
-
30
- # Attribute type mapping.
31
- def self.fastly_types
32
- {
33
- :'errors' => :'Array<ErrorResponseData>'
34
- }
35
- end
36
-
37
- # List of attributes with nullable: true
38
- def self.fastly_nullable
39
- Set.new([
40
- ])
41
- end
42
-
43
- # Initializes the object
44
- # @param [Hash] attributes Model attributes in the form of hash
45
- def initialize(attributes = {})
46
- if (!attributes.is_a?(Hash))
47
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ErrorResponse` initialize method"
48
- end
49
-
50
- # check to see if the attribute exists and convert string to symbol for hash key
51
- attributes = attributes.each_with_object({}) { |(k, v), h|
52
- if (!self.class.attribute_map.key?(k.to_sym))
53
- 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
54
- end
55
- h[k.to_sym] = v
56
- }
57
-
58
- if attributes.key?(:'errors')
59
- if (value = attributes[:'errors']).is_a?(Array)
60
- self.errors = value
61
- end
62
- end
63
- end
64
-
65
- # Show invalid properties with the reasons. Usually used together with valid?
66
- # @return Array for valid properties with the reasons
67
- def list_invalid_properties
68
- invalid_properties = Array.new
69
- invalid_properties
70
- end
71
-
72
- # Check to see if the all the properties in the model are valid
73
- # @return true if the model is valid
74
- def valid?
75
- true
76
- end
77
-
78
- # Checks equality by comparing each attribute.
79
- # @param [Object] Object to be compared
80
- def ==(o)
81
- return true if self.equal?(o)
82
- self.class == o.class &&
83
- errors == o.errors
84
- end
85
-
86
- # @see the `==` method
87
- # @param [Object] Object to be compared
88
- def eql?(o)
89
- self == o
90
- end
91
-
92
- # Calculates hash code according to all attributes.
93
- # @return [Integer] Hash code
94
- def hash
95
- [errors].hash
96
- end
97
-
98
- # Builds the object from hash
99
- # @param [Hash] attributes Model attributes in the form of hash
100
- # @return [Object] Returns the model itself
101
- def self.build_from_hash(attributes)
102
- new.build_from_hash(attributes)
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 build_from_hash(attributes)
109
- return nil unless attributes.is_a?(Hash)
110
- self.class.fastly_types.each_pair do |key, type|
111
- if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
112
- self.send("#{key}=", nil)
113
- elsif type =~ /\AArray<(.*)>/i
114
- # check to ensure the input is an array given that the attribute
115
- # is documented as an array but the input is not
116
- if attributes[self.class.attribute_map[key]].is_a?(Array)
117
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
118
- end
119
- elsif !attributes[self.class.attribute_map[key]].nil?
120
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
121
- end
122
- end
123
-
124
- self
125
- end
126
-
127
- # Deserializes the data based on type
128
- # @param string type Data type
129
- # @param string value Value to be deserialized
130
- # @return [Object] Deserialized data
131
- def _deserialize(type, value)
132
- case type.to_sym
133
- when :Time
134
- Time.parse(value)
135
- when :Date
136
- Date.parse(value)
137
- when :String
138
- value.to_s
139
- when :Integer
140
- value.to_i
141
- when :Float
142
- value.to_f
143
- when :Boolean
144
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
145
- true
146
- else
147
- false
148
- end
149
- when :Object
150
- # generic object (usually a Hash), return directly
151
- value
152
- when /\AArray<(?<inner_type>.+)>\z/
153
- inner_type = Regexp.last_match[:inner_type]
154
- value.map { |v| _deserialize(inner_type, v) }
155
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
156
- k_type = Regexp.last_match[:k_type]
157
- v_type = Regexp.last_match[:v_type]
158
- {}.tap do |hash|
159
- value.each do |k, v|
160
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
- end
162
- end
163
- else # model
164
- # models (e.g. Pet) or oneOf
165
- klass = Fastly.const_get(type)
166
- klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
167
- end
168
- end
169
-
170
- # Returns the string representation of the object
171
- # @return [String] String presentation of the object
172
- def to_s
173
- to_hash.to_s
174
- end
175
-
176
- # to_body is an alias to to_hash (backward compatibility)
177
- # @return [Hash] Returns the object in the form of hash
178
- def to_body
179
- to_hash
180
- end
181
-
182
- # Returns the object in the form of hash
183
- # @return [Hash] Returns the object in the form of hash
184
- def to_hash
185
- hash = {}
186
- self.class.attribute_map.each_pair do |attr, param|
187
- value = self.send(attr)
188
- if value.nil?
189
- is_nullable = self.class.fastly_nullable.include?(attr)
190
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
- end
192
-
193
- hash[param] = _to_hash(value)
194
- end
195
- hash
196
- end
197
-
198
- # Outputs non-array value in the form of hash
199
- # For object, use to_hash. Otherwise, just return the value
200
- # @param [Object] value Any valid value
201
- # @return [Hash] Returns the value in the form of hash
202
- def _to_hash(value)
203
- if value.is_a?(Array)
204
- value.compact.map { |v| _to_hash(v) }
205
- elsif value.is_a?(Hash)
206
- {}.tap do |hash|
207
- value.each { |k, v| hash[k] = _to_hash(v) }
208
- end
209
- elsif value.respond_to? :to_hash
210
- value.to_hash
211
- else
212
- value
213
- end
214
- end
215
-
216
- end
217
-
218
- end
@@ -1,225 +0,0 @@
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