lib/fastly/api/snippet_api.rb in fastly-5.3.0 vs lib/fastly/api/snippet_api.rb in fastly-5.3.1
- old
+ new
@@ -20,11 +20,11 @@
# Create a snippet
# Create a snippet for a particular service and version.
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
# @option opts [Integer] :version_id Integer identifying a service version. (required)
# @option opts [String] :name The name for the snippet.
- # @option opts [Integer] :dynamic Sets the snippet version.
+ # @option opts [String] :dynamic Sets the snippet version.
# @option opts [String] :type The location in generated VCL where the snippet should be placed.
# @option opts [String] :content The VCL code that specifies exactly what the snippet does.
# @option opts [String] :priority Priority determines execution order. Lower numbers execute first. (default to '100')
# @return [SnippetResponse]
def create_snippet(opts = {})
@@ -35,11 +35,11 @@
# Create a snippet
# Create a snippet for a particular service and version.
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
# @option opts [Integer] :version_id Integer identifying a service version. (required)
# @option opts [String] :name The name for the snippet.
- # @option opts [Integer] :dynamic Sets the snippet version.
+ # @option opts [String] :dynamic Sets the snippet version.
# @option opts [String] :type The location in generated VCL where the snippet should be placed.
# @option opts [String] :content The VCL code that specifies exactly what the snippet does.
# @option opts [String] :priority Priority determines execution order. Lower numbers execute first. (default to '100')
# @return [Array<(SnippetResponse, Integer, Hash)>] SnippetResponse data, response status code and response headers
def create_snippet_with_http_info(opts = {})
@@ -55,11 +55,11 @@
end
# verify the required parameter 'version_id' is set
if @api_client.config.client_side_validation && version_id.nil?
fail ArgumentError, "Missing the required parameter 'version_id' when calling SnippetApi.create_snippet"
end
- allowable_values = [0, 1]
+ allowable_values = ["0", "1"]
if @api_client.config.client_side_validation && opts[:'dynamic'] && !allowable_values.include?(opts[:'dynamic'])
fail ArgumentError, "invalid value for \"dynamic\", must be one of #{allowable_values}"
end
allowable_values = ["init", "recv", "hash", "hit", "miss", "pass", "fetch", "error", "deliver", "log", "none"]
if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
@@ -412,11 +412,11 @@
# Update a dynamic snippet
# Update a dynamic snippet for a particular service.
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
# @option opts [String] :snippet_id Alphanumeric string identifying a VCL Snippet. (required)
# @option opts [String] :name The name for the snippet.
- # @option opts [Integer] :dynamic Sets the snippet version.
+ # @option opts [String] :dynamic Sets the snippet version.
# @option opts [String] :type The location in generated VCL where the snippet should be placed.
# @option opts [String] :content The VCL code that specifies exactly what the snippet does.
# @option opts [String] :priority Priority determines execution order. Lower numbers execute first. (default to '100')
# @return [SnippetResponse]
def update_snippet_dynamic(opts = {})
@@ -427,11 +427,11 @@
# Update a dynamic snippet
# Update a dynamic snippet for a particular service.
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
# @option opts [String] :snippet_id Alphanumeric string identifying a VCL Snippet. (required)
# @option opts [String] :name The name for the snippet.
- # @option opts [Integer] :dynamic Sets the snippet version.
+ # @option opts [String] :dynamic Sets the snippet version.
# @option opts [String] :type The location in generated VCL where the snippet should be placed.
# @option opts [String] :content The VCL code that specifies exactly what the snippet does.
# @option opts [String] :priority Priority determines execution order. Lower numbers execute first. (default to '100')
# @return [Array<(SnippetResponse, Integer, Hash)>] SnippetResponse data, response status code and response headers
def update_snippet_dynamic_with_http_info(opts = {})
@@ -447,10 +447,10 @@
end
# verify the required parameter 'snippet_id' is set
if @api_client.config.client_side_validation && snippet_id.nil?
fail ArgumentError, "Missing the required parameter 'snippet_id' when calling SnippetApi.update_snippet_dynamic"
end
- allowable_values = [0, 1]
+ allowable_values = ["0", "1"]
if @api_client.config.client_side_validation && opts[:'dynamic'] && !allowable_values.include?(opts[:'dynamic'])
fail ArgumentError, "invalid value for \"dynamic\", must be one of #{allowable_values}"
end
allowable_values = ["init", "recv", "hash", "hit", "miss", "pass", "fetch", "error", "deliver", "log", "none"]
if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])