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.
Add network peerings for inspec (#4002) (#449)
Signed-off-by: Modular Magician <magic-modules@google.com>
- Loading branch information
1 parent
3edd18f
commit da36f4c
Showing
5 changed files
with
82 additions
and
0 deletions.
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
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,60 @@ | ||
# 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 NetworkPeerings | ||
attr_reader :name | ||
|
||
attr_reader :state | ||
|
||
attr_reader :state_details | ||
|
||
attr_reader :network | ||
|
||
attr_reader :export_custom_routes | ||
|
||
attr_reader :import_custom_routes | ||
|
||
attr_reader :peer_mtu | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@name = args['name'] | ||
@state = args['state'] | ||
@state_details = args['stateDetails'] | ||
@network = args['network'] | ||
@export_custom_routes = args['exportCustomRoutes'] | ||
@import_custom_routes = args['importCustomRoutes'] | ||
@peer_mtu = args['peerMtu'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} NetworkPeerings" | ||
end | ||
end | ||
|
||
class NetworkPeeringsArray | ||
def self.parse(value, parent_identifier) | ||
return if value.nil? | ||
return NetworkPeerings.new(value, parent_identifier) unless value.is_a?(::Array) | ||
value.map { |v| NetworkPeerings.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