This repository has been archived by the owner on Nov 14, 2024. It is now read-only.
forked from inspec/inspec-gcp
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #273 from modular-magician/codegen-pr-2814
InSpec Add back pathmatchers except for routerules
- Loading branch information
Showing
25 changed files
with
1,110 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
require 'google/compute/property/urlmap_path_matchers_header_action' | ||
require 'google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add' | ||
require 'google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules' | ||
module GoogleInSpec | ||
module Compute | ||
module Property | ||
class UrlMapPathMatchers | ||
attr_reader :default_service | ||
|
||
attr_reader :description | ||
|
||
attr_reader :header_action | ||
|
||
attr_reader :name | ||
|
||
attr_reader :path_rules | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@default_service = args['defaultService'] | ||
@description = args['description'] | ||
@header_action = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderAction.new(args['headerAction'], to_s) | ||
@name = args['name'] | ||
@path_rules = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesArray.parse(args['pathRules'], to_s) | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} UrlMapPathMatchers" | ||
end | ||
end | ||
|
||
class UrlMapPathMatchersArray | ||
def self.parse(value, parent_identifier) | ||
return if value.nil? | ||
return UrlMapPathMatchers.new(value, parent_identifier) unless value.is_a?(::Array) | ||
value.map { |v| UrlMapPathMatchers.new(v, parent_identifier) } | ||
end | ||
end | ||
end | ||
end | ||
end |
45 changes: 45 additions & 0 deletions
45
libraries/google/compute/property/urlmap_path_matchers_header_action.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
require 'google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add' | ||
require 'google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add' | ||
module GoogleInSpec | ||
module Compute | ||
module Property | ||
class UrlMapPathMatchersHeaderAction | ||
attr_reader :request_headers_to_add | ||
|
||
attr_reader :request_headers_to_remove | ||
|
||
attr_reader :response_headers_to_add | ||
|
||
attr_reader :response_headers_to_remove | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@request_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) | ||
@request_headers_to_remove = args['requestHeadersToRemove'] | ||
@response_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) | ||
@response_headers_to_remove = args['responseHeadersToRemove'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} UrlMapPathMatchersHeaderAction" | ||
end | ||
end | ||
end | ||
end | ||
end |
48 changes: 48 additions & 0 deletions
48
...ries/google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module Compute | ||
module Property | ||
class UrlMapPathMatchersHeaderActionRequestHeadersToAdd | ||
attr_reader :header_name | ||
|
||
attr_reader :header_value | ||
|
||
attr_reader :replace | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@header_name = args['headerName'] | ||
@header_value = args['headerValue'] | ||
@replace = args['replace'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} UrlMapPathMatchersHeaderActionRequestHeadersToAdd" | ||
end | ||
end | ||
|
||
class UrlMapPathMatchersHeaderActionRequestHeadersToAddArray | ||
def self.parse(value, parent_identifier) | ||
return if value.nil? | ||
return UrlMapPathMatchersHeaderActionRequestHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) | ||
value.map { |v| UrlMapPathMatchersHeaderActionRequestHeadersToAdd.new(v, parent_identifier) } | ||
end | ||
end | ||
end | ||
end | ||
end |
48 changes: 48 additions & 0 deletions
48
...ies/google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module Compute | ||
module Property | ||
class UrlMapPathMatchersHeaderActionResponseHeadersToAdd | ||
attr_reader :header_name | ||
|
||
attr_reader :header_value | ||
|
||
attr_reader :replace | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@header_name = args['headerName'] | ||
@header_value = args['headerValue'] | ||
@replace = args['replace'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} UrlMapPathMatchersHeaderActionResponseHeadersToAdd" | ||
end | ||
end | ||
|
||
class UrlMapPathMatchersHeaderActionResponseHeadersToAddArray | ||
def self.parse(value, parent_identifier) | ||
return if value.nil? | ||
return UrlMapPathMatchersHeaderActionResponseHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) | ||
value.map { |v| UrlMapPathMatchersHeaderActionResponseHeadersToAdd.new(v, parent_identifier) } | ||
end | ||
end | ||
end | ||
end | ||
end |
64 changes: 64 additions & 0 deletions
64
libraries/google/compute/property/urlmap_path_matchers_path_rules.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_cors_policy' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_abort' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay_fixed_delay' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_request_mirror_policy' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy_per_try_timeout' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_timeout' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_url_rewrite' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_url_redirect' | ||
module GoogleInSpec | ||
module Compute | ||
module Property | ||
class UrlMapPathMatchersPathRules | ||
attr_reader :service | ||
|
||
attr_reader :paths | ||
|
||
attr_reader :route_action | ||
|
||
attr_reader :url_redirect | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@service = args['service'] | ||
@paths = args['paths'] | ||
@route_action = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteAction.new(args['routeAction'], to_s) | ||
@url_redirect = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesUrlRedirect.new(args['urlRedirect'], to_s) | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} UrlMapPathMatchersPathRules" | ||
end | ||
end | ||
|
||
class UrlMapPathMatchersPathRulesArray | ||
def self.parse(value, parent_identifier) | ||
return if value.nil? | ||
return UrlMapPathMatchersPathRules.new(value, parent_identifier) unless value.is_a?(::Array) | ||
value.map { |v| UrlMapPathMatchersPathRules.new(v, parent_identifier) } | ||
end | ||
end | ||
end | ||
end | ||
end |
63 changes: 63 additions & 0 deletions
63
libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_cors_policy' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_abort' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay_fixed_delay' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_request_mirror_policy' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy_per_try_timeout' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_timeout' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_url_rewrite' | ||
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services' | ||
module GoogleInSpec | ||
module Compute | ||
module Property | ||
class UrlMapPathMatchersPathRulesRouteAction | ||
attr_reader :cors_policy | ||
|
||
attr_reader :fault_injection_policy | ||
|
||
attr_reader :request_mirror_policy | ||
|
||
attr_reader :retry_policy | ||
|
||
attr_reader :timeout | ||
|
||
attr_reader :url_rewrite | ||
|
||
attr_reader :weighted_backend_services | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@cors_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionCorsPolicy.new(args['corsPolicy'], to_s) | ||
@fault_injection_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicy.new(args['faultInjectionPolicy'], to_s) | ||
@request_mirror_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionRequestMirrorPolicy.new(args['requestMirrorPolicy'], to_s) | ||
@retry_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionRetryPolicy.new(args['retryPolicy'], to_s) | ||
@timeout = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionTimeout.new(args['timeout'], to_s) | ||
@url_rewrite = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionUrlRewrite.new(args['urlRewrite'], to_s) | ||
@weighted_backend_services = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesArray.parse(args['weightedBackendServices'], to_s) | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} UrlMapPathMatchersPathRulesRouteAction" | ||
end | ||
end | ||
end | ||
end | ||
end |
55 changes: 55 additions & 0 deletions
55
...aries/google/compute/property/urlmap_path_matchers_path_rules_route_action_cors_policy.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module Compute | ||
module Property | ||
class UrlMapPathMatchersPathRulesRouteActionCorsPolicy | ||
attr_reader :allow_credentials | ||
|
||
attr_reader :allow_headers | ||
|
||
attr_reader :allow_methods | ||
|
||
attr_reader :allow_origin_regexes | ||
|
||
attr_reader :allow_origins | ||
|
||
attr_reader :disabled | ||
|
||
attr_reader :expose_headers | ||
|
||
attr_reader :max_age | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@allow_credentials = args['allowCredentials'] | ||
@allow_headers = args['allowHeaders'] | ||
@allow_methods = args['allowMethods'] | ||
@allow_origin_regexes = args['allowOriginRegexes'] | ||
@allow_origins = args['allowOrigins'] | ||
@disabled = args['disabled'] | ||
@expose_headers = args['exposeHeaders'] | ||
@max_age = args['maxAge'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} UrlMapPathMatchersPathRulesRouteActionCorsPolicy" | ||
end | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.