diff --git a/docs/resources/google_access_context_manager_service_perimeter.md b/docs/resources/google_access_context_manager_service_perimeter.md index 50a31e0ef..9be5865fa 100644 --- a/docs/resources/google_access_context_manager_service_perimeter.md +++ b/docs/resources/google_access_context_manager_service_perimeter.md @@ -51,6 +51,66 @@ Properties that can be accessed from the `google_access_context_manager_service_ * `allowed_services`: The list of APIs usable within the Service Perimeter. Must be empty unless `enableRestriction` is True. + * `ingress_policies`: / List of `IngressPolicies` to apply to the perimeter. A perimeter may have multiple `IngressPolicies`, each of which is evaluated separately. Access is granted if any `Ingress Policy` grants it. Must be empty for a perimeter bridge. + + * `ingress_from`: / Defines the conditions on the source of a request causing this `IngressPolicy` to apply. + + * `identity_type`: / Specifies the type of identities that are allowed access from outside the perimeter. If left unspecified, then members of `identities` field will be allowed access. + Possible values: + * IDENTITY_TYPE_UNSPECIFIED + * ANY_IDENTITY + * ANY_USER_ACCOUNT + * ANY_SERVICE_ACCOUNT + + * `identities`: / A list of identities that are allowed access through this ingress policy. Should be in the format of email address. The email address should represent individual user or service account only. + + * `sources`: / Sources that this `IngressPolicy` authorizes access from. + + * `access_level`: / An `AccessLevel` resource name that allow resources within the `ServicePerimeters` to be accessed from the internet. `AccessLevels` listed must be in the same policy as this `ServicePerimeter`. Referencing a nonexistent `AccessLevel` will cause an error. If no `AccessLevel` names are listed, resources within the perimeter can only be accessed via Google Cloud calls with request origins within the perimeter. Example `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL.` If * is specified, then all IngressSources will be allowed. + + * `resource`: / A Google Cloud resource that is allowed to ingress the perimeter. Requests from these resources will be allowed to access perimeter data. Currently only projects are allowed. Format `projects/{project_number}` The project may be in any Google Cloud organization, not just the organization that the perimeter is defined in. `*` is not allowed, the case of allowing all Google Cloud resources only is not supported. + + * `ingress_to`: / Defines the conditions on the `ApiOperation` and request destination that cause this `IngressPolicy` to apply. + + * `resources`: / A list of resources, currently only projects in the form `projects/`, protected by this `ServicePerimeter` that are allowed to be accessed by sources defined in the corresponding `IngressFrom`. A request matches if it contains a resource in this list. If `*` is specified for resources, then this `IngressTo` rule will authorize access to all resources inside the perimeter, provided that the request also matches the `operations` field. + + * `operations`: / A list of `ApiOperations` the sources specified in corresponding `IngressFrom` are allowed to perform in this `ServicePerimeter`. + + * `service_name`: / The name of the API whose methods or permissions the `IngressPolicy` or `EgressPolicy` want to allow. A single `ApiOperation` with `serviceName` field set to `*` will allow all methods AND permissions for all services. + + * `method_selectors`: / API methods or permissions to allow. Method or permission must belong to the service specified by serviceName field. A single `MethodSelector` entry with `*` specified for the method field will allow all methods AND permissions for the service specified in `serviceName`. + + * `method`: / Value for method should be a valid method name for the corresponding serviceName in `ApiOperation`. If `*` used as value for `method`, then ALL methods and permissions are allowed. + + * `permission`: / Value for permission should be a valid Cloud IAM permission for the corresponding `serviceName` in `ApiOperation`. + + * `egress_policies`: / List of EgressPolicies to apply to the perimeter. A perimeter may have multiple EgressPolicies, each of which is evaluated separately. Access is granted if any EgressPolicy grants it. Must be empty for a perimeter bridge. + + * `egress_from`: / Defines conditions on the source of a request causing this `EgressPolicy` to apply. + + * `identity_type`: / Specifies the type of identities that are allowed access to outside the perimeter. If left unspecified, then members of `identities` field will be allowed access. + Possible values: + * IDENTITY_TYPE_UNSPECIFIED + * ANY_IDENTITY + * ANY_USER_ACCOUNT + * ANY_SERVICE_ACCOUNT + + * `identities`: / A list of identities that are allowed access through this `EgressPolicy`. Should be in the format of email address. The email address should represent individual user or service account only. + + * `egress_to`: / Defines the conditions on the `ApiOperation` and destination resources that cause this `EgressPolicy` to apply. + + * `resources`: / A list of resources, currently only projects in the form `projects/`, that match this to stanza. A request matches if it contains a resource in this list. If * is specified for resources, then this `EgressTo` rule will authorize access to all resources outside the perimeter. + + * `operations`: / A list of `ApiOperations` that this egress rule applies to. A request matches if it contains an operation/service in this list. + + * `service_name`: / The name of the API whose methods or permissions the `IngressPolicy` or `EgressPolicy` want to allow. A single `ApiOperation` with serviceName field set to `*` will allow all methods AND permissions for all services. + + * `method_selectors`: / API methods or permissions to allow. Method or permission must belong to the service specified by `serviceName` field. A single MethodSelector entry with `*` specified for the `method` field will allow all methods AND permissions for the service specified in `serviceName`. + + * `method`: / Value for `method` should be a valid method name for the corresponding `serviceName` in `ApiOperation`. If `*` used as value for method, then ALL methods and permissions are allowed. + + * `permission`: / Value for permission should be a valid Cloud IAM permission for the corresponding `serviceName` in `ApiOperation`. + * `spec`: Proposed (or dry run) ServicePerimeter configuration. This configuration allows to specify and test ServicePerimeter configuration without enforcing actual access restrictions. Only allowed to be set when the `useExplicitDryRunSpec` flag is set. * `resources`: A list of GCP resources that are inside of the service perimeter. Currently only projects are allowed. Format: projects/{project_number} @@ -65,6 +125,66 @@ Properties that can be accessed from the `google_access_context_manager_service_ * `allowed_services`: The list of APIs usable within the Service Perimeter. Must be empty unless `enableRestriction` is True. + * `ingress_policies`: / List of `IngressPolicies` to apply to the perimeter. A perimeter may have multiple `IngressPolicies`, each of which is evaluated separately. Access is granted if any `Ingress Policy` grants it. Must be empty for a perimeter bridge. + + * `ingress_from`: / Defines the conditions on the source of a request causing this `IngressPolicy` to apply. + + * `identity_type`: / Specifies the type of identities that are allowed access from outside the perimeter. If left unspecified, then members of `identities` field will be allowed access. + Possible values: + * IDENTITY_TYPE_UNSPECIFIED + * ANY_IDENTITY + * ANY_USER_ACCOUNT + * ANY_SERVICE_ACCOUNT + + * `identities`: / A list of identities that are allowed access through this ingress policy. Should be in the format of email address. The email address should represent individual user or service account only. + + * `sources`: / Sources that this `IngressPolicy` authorizes access from. + + * `access_level`: / An `AccessLevel` resource name that allow resources within the `ServicePerimeters` to be accessed from the internet. `AccessLevels` listed must be in the same policy as this `ServicePerimeter`. Referencing a nonexistent `AccessLevel` will cause an error. If no `AccessLevel` names are listed, resources within the perimeter can only be accessed via Google Cloud calls with request origins within the perimeter. Example `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL.` If * is specified, then all IngressSources will be allowed. + + * `resource`: / A Google Cloud resource that is allowed to ingress the perimeter. Requests from these resources will be allowed to access perimeter data. Currently only projects are allowed. Format `projects/{project_number}` The project may be in any Google Cloud organization, not just the organization that the perimeter is defined in. `*` is not allowed, the case of allowing all Google Cloud resources only is not supported. + + * `ingress_to`: / Defines the conditions on the `ApiOperation` and request destination that cause this `IngressPolicy` to apply. + + * `resources`: / A list of resources, currently only projects in the form `projects/`, protected by this `ServicePerimeter` that are allowed to be accessed by sources defined in the corresponding `IngressFrom`. A request matches if it contains a resource in this list. If `*` is specified for resources, then this `IngressTo` rule will authorize access to all resources inside the perimeter, provided that the request also matches the `operations` field. + + * `operations`: / A list of `ApiOperations` the sources specified in corresponding `IngressFrom` are allowed to perform in this `ServicePerimeter`. + + * `service_name`: / The name of the API whose methods or permissions the `IngressPolicy` or `EgressPolicy` want to allow. A single `ApiOperation` with `serviceName` field set to `*` will allow all methods AND permissions for all services. + + * `method_selectors`: / API methods or permissions to allow. Method or permission must belong to the service specified by serviceName field. A single `MethodSelector` entry with `*` specified for the method field will allow all methods AND permissions for the service specified in `serviceName`. + + * `method`: / Value for method should be a valid method name for the corresponding serviceName in `ApiOperation`. If `*` used as value for `method`, then ALL methods and permissions are allowed. + + * `permission`: / Value for permission should be a valid Cloud IAM permission for the corresponding `serviceName` in `ApiOperation`. + + * `egress_policies`: / List of EgressPolicies to apply to the perimeter. A perimeter may have multiple EgressPolicies, each of which is evaluated separately. Access is granted if any EgressPolicy grants it. Must be empty for a perimeter bridge. + + * `egress_from`: / Defines conditions on the source of a request causing this `EgressPolicy` to apply. + + * `identity_type`: / Specifies the type of identities that are allowed access to outside the perimeter. If left unspecified, then members of `identities` field will be allowed access. + Possible values: + * IDENTITY_TYPE_UNSPECIFIED + * ANY_IDENTITY + * ANY_USER_ACCOUNT + * ANY_SERVICE_ACCOUNT + + * `identities`: / A list of identities that are allowed access through this `EgressPolicy`. Should be in the format of email address. The email address should represent individual user or service account only. + + * `egress_to`: / Defines the conditions on the `ApiOperation` and destination resources that cause this `EgressPolicy` to apply. + + * `resources`: / A list of resources, currently only projects in the form `projects/`, that match this to stanza. A request matches if it contains a resource in this list. If * is specified for resources, then this `EgressTo` rule will authorize access to all resources outside the perimeter. + + * `operations`: / A list of `ApiOperations` that this egress rule applies to. A request matches if it contains an operation/service in this list. + + * `service_name`: / The name of the API whose methods or permissions the `IngressPolicy` or `EgressPolicy` want to allow. A single `ApiOperation` with serviceName field set to `*` will allow all methods AND permissions for all services. + + * `method_selectors`: / API methods or permissions to allow. Method or permission must belong to the service specified by `serviceName` field. A single MethodSelector entry with `*` specified for the `method` field will allow all methods AND permissions for the service specified in `serviceName`. + + * `method`: / Value for `method` should be a valid method name for the corresponding `serviceName` in `ApiOperation`. If `*` used as value for method, then ALL methods and permissions are allowed. + + * `permission`: / Value for permission should be a valid Cloud IAM permission for the corresponding `serviceName` in `ApiOperation`. + * `use_explicit_dry_run_spec`: Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly exists for all Service Perimeters, and that spec is identical to the status for those Service Perimeters. When this flag is set, it inhibits the generation of the implicit spec, thereby allowing the user to explicitly provide a configuration ("spec") to use in a dry-run version of the Service Perimeter. This allows the user to test changes to the enforced config ("status") without actually enforcing them. This testing is done through analyzing the differences between currently enforced and suggested restrictions. useExplicitDryRunSpec must bet set to True if any of the fields in the spec are set to non-default values. * `parent`: The AccessPolicy this ServicePerimeter lives in. Format: accessPolicies/{policy_id} diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_spec.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_spec.rb index 551f51978..17b858a31 100644 --- a/libraries/google/accesscontextmanager/property/serviceperimeter_spec.rb +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_spec.rb @@ -13,6 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- +require 'google/accesscontextmanager/property/serviceperimeter_spec_egress_policies' +require 'google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies' require 'google/accesscontextmanager/property/serviceperimeter_spec_vpc_accessible_services' module GoogleInSpec module AccessContextManager @@ -26,6 +28,10 @@ class ServicePerimeterSpec attr_reader :vpc_accessible_services + attr_reader :ingress_policies + + attr_reader :egress_policies + def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @@ -33,6 +39,8 @@ def initialize(args = nil, parent_identifier = nil) @access_levels = args['accessLevels'] @restricted_services = args['restrictedServices'] @vpc_accessible_services = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpecVPCAccessibleServices.new(args['vpcAccessibleServices'], to_s) + @ingress_policies = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpecIngressPoliciesArray.parse(args['ingressPolicies'], to_s) + @egress_policies = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpecEgressPoliciesArray.parse(args['egressPolicies'], to_s) end def to_s diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_spec_egress_policies.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_egress_policies.rb new file mode 100644 index 000000000..b1cf20549 --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_egress_policies.rb @@ -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. +# +# ---------------------------------------------------------------------------- +require 'google/accesscontextmanager/property/serviceperimeter_spec_egress_policies_egress_from' +require 'google/accesscontextmanager/property/serviceperimeter_spec_egress_policies_egress_to' +require 'google/accesscontextmanager/property/serviceperimeter_spec_egress_policies_egress_to_operations' +module GoogleInSpec + module AccessContextManager + module Property + class ServicePerimeterSpecEgressPolicies + attr_reader :egress_from + + attr_reader :egress_to + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @egress_from = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpecEgressPoliciesEgressFrom.new(args['egressFrom'], to_s) + @egress_to = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpecEgressPoliciesEgressTo.new(args['egressTo'], to_s) + end + + def to_s + "#{@parent_identifier} ServicePerimeterSpecEgressPolicies" + end + end + + class ServicePerimeterSpecEgressPoliciesArray + def self.parse(value, parent_identifier) + return if value.nil? + return ServicePerimeterSpecEgressPolicies.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ServicePerimeterSpecEgressPolicies.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_spec_egress_policies_egress_from.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_egress_policies_egress_from.rb new file mode 100644 index 000000000..c414de71c --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_egress_policies_egress_from.rb @@ -0,0 +1,37 @@ +# 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 AccessContextManager + module Property + class ServicePerimeterSpecEgressPoliciesEgressFrom + attr_reader :identity_type + + attr_reader :identities + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @identity_type = args['identityType'] + @identities = args['identities'] + end + + def to_s + "#{@parent_identifier} ServicePerimeterSpecEgressPoliciesEgressFrom" + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_spec_egress_policies_egress_to.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_egress_policies_egress_to.rb new file mode 100644 index 000000000..0d17325b1 --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_egress_policies_egress_to.rb @@ -0,0 +1,38 @@ +# 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/accesscontextmanager/property/serviceperimeter_spec_egress_policies_egress_to_operations' +module GoogleInSpec + module AccessContextManager + module Property + class ServicePerimeterSpecEgressPoliciesEgressTo + attr_reader :resources + + attr_reader :operations + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @resources = args['resources'] + @operations = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpecEgressPoliciesEgressToOperationsArray.parse(args['operations'], to_s) + end + + def to_s + "#{@parent_identifier} ServicePerimeterSpecEgressPoliciesEgressTo" + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_spec_egress_policies_egress_to_operations.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_egress_policies_egress_to_operations.rb new file mode 100644 index 000000000..339afc6ee --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_egress_policies_egress_to_operations.rb @@ -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/accesscontextmanager/property/serviceperimeter_spec_egress_policies_egress_to_operations_method_selectors' +module GoogleInSpec + module AccessContextManager + module Property + class ServicePerimeterSpecEgressPoliciesEgressToOperations + attr_reader :service_name + + attr_reader :method_selectors + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @service_name = args['serviceName'] + @method_selectors = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpecEgressPoliciesEgressToOperationsMethodSelectorsArray.parse(args['methodSelectors'], to_s) + end + + def to_s + "#{@parent_identifier} ServicePerimeterSpecEgressPoliciesEgressToOperations" + end + end + + class ServicePerimeterSpecEgressPoliciesEgressToOperationsArray + def self.parse(value, parent_identifier) + return if value.nil? + return ServicePerimeterSpecEgressPoliciesEgressToOperations.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ServicePerimeterSpecEgressPoliciesEgressToOperations.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_spec_egress_policies_egress_to_operations_method_selectors.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_egress_policies_egress_to_operations_method_selectors.rb new file mode 100644 index 000000000..e81d8154a --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_egress_policies_egress_to_operations_method_selectors.rb @@ -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 AccessContextManager + module Property + class ServicePerimeterSpecEgressPoliciesEgressToOperationsMethodSelectors + attr_reader :method + + attr_reader :permission + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @method = args['method'] + @permission = args['permission'] + end + + def to_s + "#{@parent_identifier} ServicePerimeterSpecEgressPoliciesEgressToOperationsMethodSelectors" + end + end + + class ServicePerimeterSpecEgressPoliciesEgressToOperationsMethodSelectorsArray + def self.parse(value, parent_identifier) + return if value.nil? + return ServicePerimeterSpecEgressPoliciesEgressToOperationsMethodSelectors.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ServicePerimeterSpecEgressPoliciesEgressToOperationsMethodSelectors.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies.rb new file mode 100644 index 000000000..161feb960 --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies.rb @@ -0,0 +1,49 @@ +# 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/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_from' +require 'google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_from_sources' +require 'google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_to' +require 'google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_to_operations' +module GoogleInSpec + module AccessContextManager + module Property + class ServicePerimeterSpecIngressPolicies + attr_reader :ingress_from + + attr_reader :ingress_to + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @ingress_from = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpecIngressPoliciesIngressFrom.new(args['ingressFrom'], to_s) + @ingress_to = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpecIngressPoliciesIngressTo.new(args['ingressTo'], to_s) + end + + def to_s + "#{@parent_identifier} ServicePerimeterSpecIngressPolicies" + end + end + + class ServicePerimeterSpecIngressPoliciesArray + def self.parse(value, parent_identifier) + return if value.nil? + return ServicePerimeterSpecIngressPolicies.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ServicePerimeterSpecIngressPolicies.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_from.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_from.rb new file mode 100644 index 000000000..48cdab23d --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_from.rb @@ -0,0 +1,41 @@ +# 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/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_from_sources' +module GoogleInSpec + module AccessContextManager + module Property + class ServicePerimeterSpecIngressPoliciesIngressFrom + attr_reader :identity_type + + attr_reader :identities + + attr_reader :sources + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @identity_type = args['identityType'] + @identities = args['identities'] + @sources = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpecIngressPoliciesIngressFromSourcesArray.parse(args['sources'], to_s) + end + + def to_s + "#{@parent_identifier} ServicePerimeterSpecIngressPoliciesIngressFrom" + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_from_sources.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_from_sources.rb new file mode 100644 index 000000000..47bd37d34 --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_from_sources.rb @@ -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 AccessContextManager + module Property + class ServicePerimeterSpecIngressPoliciesIngressFromSources + attr_reader :access_level + + attr_reader :resource + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @access_level = args['accessLevel'] + @resource = args['resource'] + end + + def to_s + "#{@parent_identifier} ServicePerimeterSpecIngressPoliciesIngressFromSources" + end + end + + class ServicePerimeterSpecIngressPoliciesIngressFromSourcesArray + def self.parse(value, parent_identifier) + return if value.nil? + return ServicePerimeterSpecIngressPoliciesIngressFromSources.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ServicePerimeterSpecIngressPoliciesIngressFromSources.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_to.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_to.rb new file mode 100644 index 000000000..821d99e35 --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_to.rb @@ -0,0 +1,38 @@ +# 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/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_to_operations' +module GoogleInSpec + module AccessContextManager + module Property + class ServicePerimeterSpecIngressPoliciesIngressTo + attr_reader :resources + + attr_reader :operations + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @resources = args['resources'] + @operations = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpecIngressPoliciesIngressToOperationsArray.parse(args['operations'], to_s) + end + + def to_s + "#{@parent_identifier} ServicePerimeterSpecIngressPoliciesIngressTo" + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_to_operations.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_to_operations.rb new file mode 100644 index 000000000..1b1413524 --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_to_operations.rb @@ -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/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_to_operations_method_selectors' +module GoogleInSpec + module AccessContextManager + module Property + class ServicePerimeterSpecIngressPoliciesIngressToOperations + attr_reader :service_name + + attr_reader :method_selectors + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @service_name = args['serviceName'] + @method_selectors = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpecIngressPoliciesIngressToOperationsMethodSelectorsArray.parse(args['methodSelectors'], to_s) + end + + def to_s + "#{@parent_identifier} ServicePerimeterSpecIngressPoliciesIngressToOperations" + end + end + + class ServicePerimeterSpecIngressPoliciesIngressToOperationsArray + def self.parse(value, parent_identifier) + return if value.nil? + return ServicePerimeterSpecIngressPoliciesIngressToOperations.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ServicePerimeterSpecIngressPoliciesIngressToOperations.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_to_operations_method_selectors.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_to_operations_method_selectors.rb new file mode 100644 index 000000000..5d03c6d02 --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies_ingress_to_operations_method_selectors.rb @@ -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 AccessContextManager + module Property + class ServicePerimeterSpecIngressPoliciesIngressToOperationsMethodSelectors + attr_reader :method + + attr_reader :permission + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @method = args['method'] + @permission = args['permission'] + end + + def to_s + "#{@parent_identifier} ServicePerimeterSpecIngressPoliciesIngressToOperationsMethodSelectors" + end + end + + class ServicePerimeterSpecIngressPoliciesIngressToOperationsMethodSelectorsArray + def self.parse(value, parent_identifier) + return if value.nil? + return ServicePerimeterSpecIngressPoliciesIngressToOperationsMethodSelectors.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ServicePerimeterSpecIngressPoliciesIngressToOperationsMethodSelectors.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_status.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_status.rb index 68f156de7..0a40733a8 100644 --- a/libraries/google/accesscontextmanager/property/serviceperimeter_status.rb +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_status.rb @@ -13,6 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- +require 'google/accesscontextmanager/property/serviceperimeter_status_egress_policies' +require 'google/accesscontextmanager/property/serviceperimeter_status_ingress_policies' require 'google/accesscontextmanager/property/serviceperimeter_status_vpc_accessible_services' module GoogleInSpec module AccessContextManager @@ -26,6 +28,10 @@ class ServicePerimeterStatus attr_reader :vpc_accessible_services + attr_reader :ingress_policies + + attr_reader :egress_policies + def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @@ -33,6 +39,8 @@ def initialize(args = nil, parent_identifier = nil) @access_levels = args['accessLevels'] @restricted_services = args['restrictedServices'] @vpc_accessible_services = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatusVPCAccessibleServices.new(args['vpcAccessibleServices'], to_s) + @ingress_policies = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatusIngressPoliciesArray.parse(args['ingressPolicies'], to_s) + @egress_policies = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatusEgressPoliciesArray.parse(args['egressPolicies'], to_s) end def to_s diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_status_egress_policies.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_status_egress_policies.rb new file mode 100644 index 000000000..4a33aa8b7 --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_status_egress_policies.rb @@ -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. +# +# ---------------------------------------------------------------------------- +require 'google/accesscontextmanager/property/serviceperimeter_status_egress_policies_egress_from' +require 'google/accesscontextmanager/property/serviceperimeter_status_egress_policies_egress_to' +require 'google/accesscontextmanager/property/serviceperimeter_status_egress_policies_egress_to_operations' +module GoogleInSpec + module AccessContextManager + module Property + class ServicePerimeterStatusEgressPolicies + attr_reader :egress_from + + attr_reader :egress_to + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @egress_from = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatusEgressPoliciesEgressFrom.new(args['egressFrom'], to_s) + @egress_to = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatusEgressPoliciesEgressTo.new(args['egressTo'], to_s) + end + + def to_s + "#{@parent_identifier} ServicePerimeterStatusEgressPolicies" + end + end + + class ServicePerimeterStatusEgressPoliciesArray + def self.parse(value, parent_identifier) + return if value.nil? + return ServicePerimeterStatusEgressPolicies.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ServicePerimeterStatusEgressPolicies.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_status_egress_policies_egress_from.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_status_egress_policies_egress_from.rb new file mode 100644 index 000000000..d76fc974d --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_status_egress_policies_egress_from.rb @@ -0,0 +1,37 @@ +# 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 AccessContextManager + module Property + class ServicePerimeterStatusEgressPoliciesEgressFrom + attr_reader :identity_type + + attr_reader :identities + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @identity_type = args['identityType'] + @identities = args['identities'] + end + + def to_s + "#{@parent_identifier} ServicePerimeterStatusEgressPoliciesEgressFrom" + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_status_egress_policies_egress_to.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_status_egress_policies_egress_to.rb new file mode 100644 index 000000000..b1d320659 --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_status_egress_policies_egress_to.rb @@ -0,0 +1,38 @@ +# 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/accesscontextmanager/property/serviceperimeter_status_egress_policies_egress_to_operations' +module GoogleInSpec + module AccessContextManager + module Property + class ServicePerimeterStatusEgressPoliciesEgressTo + attr_reader :resources + + attr_reader :operations + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @resources = args['resources'] + @operations = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatusEgressPoliciesEgressToOperationsArray.parse(args['operations'], to_s) + end + + def to_s + "#{@parent_identifier} ServicePerimeterStatusEgressPoliciesEgressTo" + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_status_egress_policies_egress_to_operations.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_status_egress_policies_egress_to_operations.rb new file mode 100644 index 000000000..f051fd51e --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_status_egress_policies_egress_to_operations.rb @@ -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/accesscontextmanager/property/serviceperimeter_status_egress_policies_egress_to_operations_method_selectors' +module GoogleInSpec + module AccessContextManager + module Property + class ServicePerimeterStatusEgressPoliciesEgressToOperations + attr_reader :service_name + + attr_reader :method_selectors + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @service_name = args['serviceName'] + @method_selectors = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatusEgressPoliciesEgressToOperationsMethodSelectorsArray.parse(args['methodSelectors'], to_s) + end + + def to_s + "#{@parent_identifier} ServicePerimeterStatusEgressPoliciesEgressToOperations" + end + end + + class ServicePerimeterStatusEgressPoliciesEgressToOperationsArray + def self.parse(value, parent_identifier) + return if value.nil? + return ServicePerimeterStatusEgressPoliciesEgressToOperations.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ServicePerimeterStatusEgressPoliciesEgressToOperations.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_status_egress_policies_egress_to_operations_method_selectors.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_status_egress_policies_egress_to_operations_method_selectors.rb new file mode 100644 index 000000000..6e3c6a226 --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_status_egress_policies_egress_to_operations_method_selectors.rb @@ -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 AccessContextManager + module Property + class ServicePerimeterStatusEgressPoliciesEgressToOperationsMethodSelectors + attr_reader :method + + attr_reader :permission + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @method = args['method'] + @permission = args['permission'] + end + + def to_s + "#{@parent_identifier} ServicePerimeterStatusEgressPoliciesEgressToOperationsMethodSelectors" + end + end + + class ServicePerimeterStatusEgressPoliciesEgressToOperationsMethodSelectorsArray + def self.parse(value, parent_identifier) + return if value.nil? + return ServicePerimeterStatusEgressPoliciesEgressToOperationsMethodSelectors.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ServicePerimeterStatusEgressPoliciesEgressToOperationsMethodSelectors.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies.rb new file mode 100644 index 000000000..f0812a13e --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies.rb @@ -0,0 +1,49 @@ +# 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/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_from' +require 'google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_from_sources' +require 'google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_to' +require 'google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_to_operations' +module GoogleInSpec + module AccessContextManager + module Property + class ServicePerimeterStatusIngressPolicies + attr_reader :ingress_from + + attr_reader :ingress_to + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @ingress_from = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatusIngressPoliciesIngressFrom.new(args['ingressFrom'], to_s) + @ingress_to = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatusIngressPoliciesIngressTo.new(args['ingressTo'], to_s) + end + + def to_s + "#{@parent_identifier} ServicePerimeterStatusIngressPolicies" + end + end + + class ServicePerimeterStatusIngressPoliciesArray + def self.parse(value, parent_identifier) + return if value.nil? + return ServicePerimeterStatusIngressPolicies.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ServicePerimeterStatusIngressPolicies.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_from.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_from.rb new file mode 100644 index 000000000..262cb1d2d --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_from.rb @@ -0,0 +1,41 @@ +# 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/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_from_sources' +module GoogleInSpec + module AccessContextManager + module Property + class ServicePerimeterStatusIngressPoliciesIngressFrom + attr_reader :identity_type + + attr_reader :identities + + attr_reader :sources + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @identity_type = args['identityType'] + @identities = args['identities'] + @sources = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatusIngressPoliciesIngressFromSourcesArray.parse(args['sources'], to_s) + end + + def to_s + "#{@parent_identifier} ServicePerimeterStatusIngressPoliciesIngressFrom" + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_from_sources.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_from_sources.rb new file mode 100644 index 000000000..9d06c3888 --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_from_sources.rb @@ -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 AccessContextManager + module Property + class ServicePerimeterStatusIngressPoliciesIngressFromSources + attr_reader :access_level + + attr_reader :resource + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @access_level = args['accessLevel'] + @resource = args['resource'] + end + + def to_s + "#{@parent_identifier} ServicePerimeterStatusIngressPoliciesIngressFromSources" + end + end + + class ServicePerimeterStatusIngressPoliciesIngressFromSourcesArray + def self.parse(value, parent_identifier) + return if value.nil? + return ServicePerimeterStatusIngressPoliciesIngressFromSources.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ServicePerimeterStatusIngressPoliciesIngressFromSources.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_to.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_to.rb new file mode 100644 index 000000000..aa8f3865c --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_to.rb @@ -0,0 +1,38 @@ +# 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/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_to_operations' +module GoogleInSpec + module AccessContextManager + module Property + class ServicePerimeterStatusIngressPoliciesIngressTo + attr_reader :resources + + attr_reader :operations + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @resources = args['resources'] + @operations = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatusIngressPoliciesIngressToOperationsArray.parse(args['operations'], to_s) + end + + def to_s + "#{@parent_identifier} ServicePerimeterStatusIngressPoliciesIngressTo" + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_to_operations.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_to_operations.rb new file mode 100644 index 000000000..489cb64da --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_to_operations.rb @@ -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/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_to_operations_method_selectors' +module GoogleInSpec + module AccessContextManager + module Property + class ServicePerimeterStatusIngressPoliciesIngressToOperations + attr_reader :service_name + + attr_reader :method_selectors + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @service_name = args['serviceName'] + @method_selectors = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatusIngressPoliciesIngressToOperationsMethodSelectorsArray.parse(args['methodSelectors'], to_s) + end + + def to_s + "#{@parent_identifier} ServicePerimeterStatusIngressPoliciesIngressToOperations" + end + end + + class ServicePerimeterStatusIngressPoliciesIngressToOperationsArray + def self.parse(value, parent_identifier) + return if value.nil? + return ServicePerimeterStatusIngressPoliciesIngressToOperations.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ServicePerimeterStatusIngressPoliciesIngressToOperations.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_to_operations_method_selectors.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_to_operations_method_selectors.rb new file mode 100644 index 000000000..5f2618f9d --- /dev/null +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_status_ingress_policies_ingress_to_operations_method_selectors.rb @@ -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 AccessContextManager + module Property + class ServicePerimeterStatusIngressPoliciesIngressToOperationsMethodSelectors + attr_reader :method + + attr_reader :permission + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @method = args['method'] + @permission = args['permission'] + end + + def to_s + "#{@parent_identifier} ServicePerimeterStatusIngressPoliciesIngressToOperationsMethodSelectors" + end + end + + class ServicePerimeterStatusIngressPoliciesIngressToOperationsMethodSelectorsArray + def self.parse(value, parent_identifier) + return if value.nil? + return ServicePerimeterStatusIngressPoliciesIngressToOperationsMethodSelectors.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ServicePerimeterStatusIngressPoliciesIngressToOperationsMethodSelectors.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google_access_context_manager_service_perimeter.rb b/libraries/google_access_context_manager_service_perimeter.rb index 09dfb76a2..765c630ac 100644 --- a/libraries/google_access_context_manager_service_perimeter.rb +++ b/libraries/google_access_context_manager_service_perimeter.rb @@ -15,8 +15,12 @@ # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/accesscontextmanager/property/serviceperimeter_spec' +require 'google/accesscontextmanager/property/serviceperimeter_spec_egress_policies' +require 'google/accesscontextmanager/property/serviceperimeter_spec_ingress_policies' require 'google/accesscontextmanager/property/serviceperimeter_spec_vpc_accessible_services' require 'google/accesscontextmanager/property/serviceperimeter_status' +require 'google/accesscontextmanager/property/serviceperimeter_status_egress_policies' +require 'google/accesscontextmanager/property/serviceperimeter_status_ingress_policies' require 'google/accesscontextmanager/property/serviceperimeter_status_vpc_accessible_services' # A provider to manage Access Context Manager (VPC Service Controls) resources.