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.
Add metadataFilters to GlobalForwardingRule
Signed-off-by: Modular Magician <[email protected]>
- Loading branch information
1 parent
b254d8c
commit c92f77d
Showing
6 changed files
with
104 additions
and
1 deletion.
There are no files selected for viewing
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
46 changes: 46 additions & 0 deletions
46
libraries/google/compute/property/globalforwardingrule_metadata_filters.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,46 @@ | ||
# 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/globalforwardingrule_metadata_filters_filter_labels' | ||
module GoogleInSpec | ||
module Compute | ||
module Property | ||
class GlobalForwardingRuleMetadataFilters | ||
attr_reader :filter_match_criteria | ||
|
||
attr_reader :filter_labels | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@filter_match_criteria = args['filterMatchCriteria'] | ||
@filter_labels = GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersFilterLabelsArray.parse(args['filterLabels'], to_s) | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} GlobalForwardingRuleMetadataFilters" | ||
end | ||
end | ||
|
||
class GlobalForwardingRuleMetadataFiltersArray | ||
def self.parse(value, parent_identifier) | ||
return if value.nil? | ||
return GlobalForwardingRuleMetadataFilters.new(value, parent_identifier) unless value.is_a?(::Array) | ||
value.map { |v| GlobalForwardingRuleMetadataFilters.new(v, parent_identifier) } | ||
end | ||
end | ||
end | ||
end | ||
end |
45 changes: 45 additions & 0 deletions
45
libraries/google/compute/property/globalforwardingrule_metadata_filters_filter_labels.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. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module Compute | ||
module Property | ||
class GlobalForwardingRuleMetadataFiltersFilterLabels | ||
attr_reader :name | ||
|
||
attr_reader :value | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@name = args['name'] | ||
@value = args['value'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} GlobalForwardingRuleMetadataFiltersFilterLabels" | ||
end | ||
end | ||
|
||
class GlobalForwardingRuleMetadataFiltersFilterLabelsArray | ||
def self.parse(value, parent_identifier) | ||
return if value.nil? | ||
return GlobalForwardingRuleMetadataFiltersFilterLabels.new(value, parent_identifier) unless value.is_a?(::Array) | ||
value.map { |v| GlobalForwardingRuleMetadataFiltersFilterLabels.new(v, parent_identifier) } | ||
end | ||
end | ||
end | ||
end | ||
end |
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