From deea81f7bf7a2c72e4b273b09d9263279953fd5f Mon Sep 17 00:00:00 2001 From: Google APIs Date: Wed, 10 Oct 2018 00:36:16 +0000 Subject: [PATCH] Autogenerated update (2018-10-10) Update: - cloudasset_v1beta1 - cloudbuild_v1 - cloudkms_v1 - firebaserules_v1 - iam_v1 - toolresults_v1beta3 --- api_names_out.yaml | 125 ++++ .../apis/accesscontextmanager_v1beta.rb | 34 + .../accesscontextmanager_v1beta/classes.rb | 697 ++++++++++++++++++ .../representations.rb | 240 ++++++ .../accesscontextmanager_v1beta/service.rb | 666 +++++++++++++++++ generated/google/apis/cloudasset_v1beta1.rb | 2 +- .../google/apis/cloudasset_v1beta1/classes.rb | 10 +- generated/google/apis/cloudbuild_v1.rb | 2 +- .../google/apis/cloudbuild_v1/classes.rb | 3 +- generated/google/apis/cloudkms_v1.rb | 2 +- generated/google/apis/firebaserules_v1.rb | 2 +- generated/google/apis/iam_v1.rb | 2 +- generated/google/apis/iam_v1/classes.rb | 7 +- generated/google/apis/toolresults_v1beta3.rb | 2 +- 14 files changed, 1779 insertions(+), 15 deletions(-) create mode 100644 generated/google/apis/accesscontextmanager_v1beta.rb create mode 100644 generated/google/apis/accesscontextmanager_v1beta/classes.rb create mode 100644 generated/google/apis/accesscontextmanager_v1beta/representations.rb create mode 100644 generated/google/apis/accesscontextmanager_v1beta/service.rb diff --git a/api_names_out.yaml b/api_names_out.yaml index 4c7501819..ac147b55e 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -37,6 +37,131 @@ "/acceleratedmobilepageurl:v1/fields": fields "/acceleratedmobilepageurl:v1/key": key "/acceleratedmobilepageurl:v1/quotaUser": quota_user +"/accesscontextmanager:v1beta/AccessLevel": access_level +"/accesscontextmanager:v1beta/AccessLevel/basic": basic +"/accesscontextmanager:v1beta/AccessLevel/createTime": create_time +"/accesscontextmanager:v1beta/AccessLevel/description": description +"/accesscontextmanager:v1beta/AccessLevel/name": name +"/accesscontextmanager:v1beta/AccessLevel/title": title +"/accesscontextmanager:v1beta/AccessLevel/updateTime": update_time +"/accesscontextmanager:v1beta/AccessPolicy": access_policy +"/accesscontextmanager:v1beta/AccessPolicy/createTime": create_time +"/accesscontextmanager:v1beta/AccessPolicy/name": name +"/accesscontextmanager:v1beta/AccessPolicy/parent": parent +"/accesscontextmanager:v1beta/AccessPolicy/title": title +"/accesscontextmanager:v1beta/AccessPolicy/updateTime": update_time +"/accesscontextmanager:v1beta/BasicLevel": basic_level +"/accesscontextmanager:v1beta/BasicLevel/combiningFunction": combining_function +"/accesscontextmanager:v1beta/BasicLevel/conditions": conditions +"/accesscontextmanager:v1beta/BasicLevel/conditions/condition": condition +"/accesscontextmanager:v1beta/Condition": condition +"/accesscontextmanager:v1beta/Condition/devicePolicy": device_policy +"/accesscontextmanager:v1beta/Condition/ipSubnetworks": ip_subnetworks +"/accesscontextmanager:v1beta/Condition/ipSubnetworks/ip_subnetwork": ip_subnetwork +"/accesscontextmanager:v1beta/Condition/members": members +"/accesscontextmanager:v1beta/Condition/members/member": member +"/accesscontextmanager:v1beta/Condition/negate": negate +"/accesscontextmanager:v1beta/Condition/requiredAccessLevels": required_access_levels +"/accesscontextmanager:v1beta/Condition/requiredAccessLevels/required_access_level": required_access_level +"/accesscontextmanager:v1beta/DevicePolicy": device_policy +"/accesscontextmanager:v1beta/DevicePolicy/allowedDeviceManagementLevels": allowed_device_management_levels +"/accesscontextmanager:v1beta/DevicePolicy/allowedDeviceManagementLevels/allowed_device_management_level": allowed_device_management_level +"/accesscontextmanager:v1beta/DevicePolicy/allowedEncryptionStatuses": allowed_encryption_statuses +"/accesscontextmanager:v1beta/DevicePolicy/allowedEncryptionStatuses/allowed_encryption_status": allowed_encryption_status +"/accesscontextmanager:v1beta/DevicePolicy/osConstraints": os_constraints +"/accesscontextmanager:v1beta/DevicePolicy/osConstraints/os_constraint": os_constraint +"/accesscontextmanager:v1beta/DevicePolicy/requireScreenlock": require_screenlock +"/accesscontextmanager:v1beta/ListAccessLevelsResponse": list_access_levels_response +"/accesscontextmanager:v1beta/ListAccessLevelsResponse/accessLevels": access_levels +"/accesscontextmanager:v1beta/ListAccessLevelsResponse/accessLevels/access_level": access_level +"/accesscontextmanager:v1beta/ListAccessLevelsResponse/nextPageToken": next_page_token +"/accesscontextmanager:v1beta/ListAccessPoliciesResponse": list_access_policies_response +"/accesscontextmanager:v1beta/ListAccessPoliciesResponse/accessPolicies": access_policies +"/accesscontextmanager:v1beta/ListAccessPoliciesResponse/accessPolicies/access_policy": access_policy +"/accesscontextmanager:v1beta/ListAccessPoliciesResponse/nextPageToken": next_page_token +"/accesscontextmanager:v1beta/ListServicePerimetersResponse": list_service_perimeters_response +"/accesscontextmanager:v1beta/ListServicePerimetersResponse/nextPageToken": next_page_token +"/accesscontextmanager:v1beta/ListServicePerimetersResponse/servicePerimeters": service_perimeters +"/accesscontextmanager:v1beta/ListServicePerimetersResponse/servicePerimeters/service_perimeter": service_perimeter +"/accesscontextmanager:v1beta/Operation": operation +"/accesscontextmanager:v1beta/Operation/done": done +"/accesscontextmanager:v1beta/Operation/error": error +"/accesscontextmanager:v1beta/Operation/metadata": metadata +"/accesscontextmanager:v1beta/Operation/metadata/metadatum": metadatum +"/accesscontextmanager:v1beta/Operation/name": name +"/accesscontextmanager:v1beta/Operation/response": response +"/accesscontextmanager:v1beta/Operation/response/response": response +"/accesscontextmanager:v1beta/OsConstraint": os_constraint +"/accesscontextmanager:v1beta/OsConstraint/minimumVersion": minimum_version +"/accesscontextmanager:v1beta/OsConstraint/osType": os_type +"/accesscontextmanager:v1beta/ServicePerimeter": service_perimeter +"/accesscontextmanager:v1beta/ServicePerimeter/createTime": create_time +"/accesscontextmanager:v1beta/ServicePerimeter/description": description +"/accesscontextmanager:v1beta/ServicePerimeter/name": name +"/accesscontextmanager:v1beta/ServicePerimeter/perimeterType": perimeter_type +"/accesscontextmanager:v1beta/ServicePerimeter/status": status +"/accesscontextmanager:v1beta/ServicePerimeter/title": title +"/accesscontextmanager:v1beta/ServicePerimeter/updateTime": update_time +"/accesscontextmanager:v1beta/ServicePerimeterConfig": service_perimeter_config +"/accesscontextmanager:v1beta/ServicePerimeterConfig/accessLevels": access_levels +"/accesscontextmanager:v1beta/ServicePerimeterConfig/accessLevels/access_level": access_level +"/accesscontextmanager:v1beta/ServicePerimeterConfig/resources": resources +"/accesscontextmanager:v1beta/ServicePerimeterConfig/resources/resource": resource +"/accesscontextmanager:v1beta/ServicePerimeterConfig/restrictedServices": restricted_services +"/accesscontextmanager:v1beta/ServicePerimeterConfig/restrictedServices/restricted_service": restricted_service +"/accesscontextmanager:v1beta/ServicePerimeterConfig/unrestrictedServices": unrestricted_services +"/accesscontextmanager:v1beta/ServicePerimeterConfig/unrestrictedServices/unrestricted_service": unrestricted_service +"/accesscontextmanager:v1beta/Status": status +"/accesscontextmanager:v1beta/Status/code": code +"/accesscontextmanager:v1beta/Status/details": details +"/accesscontextmanager:v1beta/Status/details/detail": detail +"/accesscontextmanager:v1beta/Status/details/detail/detail": detail +"/accesscontextmanager:v1beta/Status/message": message +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.accessLevels.create": create_access_policy_access_level +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.accessLevels.create/parent": parent +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.accessLevels.delete": delete_access_policy_access_level +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.accessLevels.delete/name": name +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.accessLevels.get": get_access_policy_access_level +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.accessLevels.get/accessLevelFormat": access_level_format +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.accessLevels.get/name": name +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.accessLevels.list": list_access_policy_access_levels +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.accessLevels.list/accessLevelFormat": access_level_format +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.accessLevels.list/pageSize": page_size +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.accessLevels.list/pageToken": page_token +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.accessLevels.list/parent": parent +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.accessLevels.patch": patch_access_policy_access_level +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.accessLevels.patch/name": name +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.accessLevels.patch/updateMask": update_mask +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.create": create_access_policy +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.delete": delete_access_policy +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.delete/name": name +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.get": get_access_policy +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.get/name": name +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.list": list_access_policies +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.list/pageSize": page_size +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.list/pageToken": page_token +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.list/parent": parent +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.patch": patch_access_policy +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.patch/name": name +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.patch/updateMask": update_mask +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.servicePerimeters.create": create_access_policy_service_perimeter +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.servicePerimeters.create/parent": parent +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.servicePerimeters.delete": delete_access_policy_service_perimeter +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.servicePerimeters.delete/name": name +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.servicePerimeters.get": get_access_policy_service_perimeter +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.servicePerimeters.get/name": name +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.servicePerimeters.list": list_access_policy_service_perimeters +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.servicePerimeters.list/pageSize": page_size +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.servicePerimeters.list/pageToken": page_token +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.servicePerimeters.list/parent": parent +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.servicePerimeters.patch": patch_access_policy_service_perimeter +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.servicePerimeters.patch/name": name +"/accesscontextmanager:v1beta/accesscontextmanager.accessPolicies.servicePerimeters.patch/updateMask": update_mask +"/accesscontextmanager:v1beta/accesscontextmanager.operations.get": get_operation +"/accesscontextmanager:v1beta/accesscontextmanager.operations.get/name": name +"/accesscontextmanager:v1beta/fields": fields +"/accesscontextmanager:v1beta/key": key +"/accesscontextmanager:v1beta/quotaUser": quota_user "/adexchangebuyer2:v2beta1/AbsoluteDateRange": absolute_date_range "/adexchangebuyer2:v2beta1/AbsoluteDateRange/endDate": end_date "/adexchangebuyer2:v2beta1/AbsoluteDateRange/startDate": start_date diff --git a/generated/google/apis/accesscontextmanager_v1beta.rb b/generated/google/apis/accesscontextmanager_v1beta.rb new file mode 100644 index 000000000..36583546a --- /dev/null +++ b/generated/google/apis/accesscontextmanager_v1beta.rb @@ -0,0 +1,34 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/accesscontextmanager_v1beta/service.rb' +require 'google/apis/accesscontextmanager_v1beta/classes.rb' +require 'google/apis/accesscontextmanager_v1beta/representations.rb' + +module Google + module Apis + # Access Context Manager API + # + # An API for setting attribute based access control to requests to GCP services. + # + # @see https://cloud.google.com/access-context-manager/docs/reference/rest/ + module AccesscontextmanagerV1beta + VERSION = 'V1beta' + REVISION = '20181007' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + end + end +end diff --git a/generated/google/apis/accesscontextmanager_v1beta/classes.rb b/generated/google/apis/accesscontextmanager_v1beta/classes.rb new file mode 100644 index 000000000..843e724a3 --- /dev/null +++ b/generated/google/apis/accesscontextmanager_v1beta/classes.rb @@ -0,0 +1,697 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module AccesscontextmanagerV1beta + + # An `AccessLevel` is a label that can be applied to requests to GCP services, + # along with a list of requirements necessary for the label to be applied. + # `AccessLevels` can be referenced in `AccessZones` and in the `Cloud Org + # Policy` API. + class AccessLevel + include Google::Apis::Core::Hashable + + # `BasicLevel` is an `AccessLevel` using a set of recommended features. + # Corresponds to the JSON property `basic` + # @return [Google::Apis::AccesscontextmanagerV1beta::BasicLevel] + attr_accessor :basic + + # Output only. Time the `AccessLevel` was created in UTC. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Description of the `AccessLevel` and its use. Does not affect behavior. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Required. Resource name for the Access Level. The `short_name` component + # must begin with a letter and only include alphanumeric and '_'. Format: + # `accessPolicies/`policy_id`/accessLevels/`short_name`` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Human readable title. Must be unique within the Policy. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # Output only. Time the `AccessLevel` was updated in UTC. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @basic = args[:basic] if args.key?(:basic) + @create_time = args[:create_time] if args.key?(:create_time) + @description = args[:description] if args.key?(:description) + @name = args[:name] if args.key?(:name) + @title = args[:title] if args.key?(:title) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # `AccessPolicy` is a container for `AccessLevels` (which define the necessary + # attributes to use GCP services) and `ServicePerimeters` (which define regions + # of services able to freely pass data within a perimeter). An access policy is + # globally visible within an organization, and the restrictions it specifies + # apply to all projects within an organization. + class AccessPolicy + include Google::Apis::Core::Hashable + + # Output only. Time the `AccessPolicy` was created in UTC. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Output only. Resource name of the `AccessPolicy`. Format: + # `accessPolicies/`policy_id`` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Required. The parent of this `AccessPolicy` in the Cloud Resource + # Hierarchy. Currently immutable once created. Format: + # `organizations/`organization_id`` + # Corresponds to the JSON property `parent` + # @return [String] + attr_accessor :parent + + # Human readable title. Does not affect behavior. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # Output only. Time the `AccessPolicy` was updated in UTC. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @name = args[:name] if args.key?(:name) + @parent = args[:parent] if args.key?(:parent) + @title = args[:title] if args.key?(:title) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # `BasicLevel` is an `AccessLevel` using a set of recommended features. + class BasicLevel + include Google::Apis::Core::Hashable + + # How the `conditions` list should be combined to determine if a request is + # granted this `AccessLevel`. If AND is used, each `Condition` in + # `conditions` must be satisfied for the `AccessLevel` to be applied. If OR + # is used, at least one `Condition` in `conditions` must be satisfied for the + # `AccessLevel` to be applied. Default behavior is AND. + # Corresponds to the JSON property `combiningFunction` + # @return [String] + attr_accessor :combining_function + + # Required. A list of requirements for the `AccessLevel` to be granted. + # Corresponds to the JSON property `conditions` + # @return [Array] + attr_accessor :conditions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @combining_function = args[:combining_function] if args.key?(:combining_function) + @conditions = args[:conditions] if args.key?(:conditions) + end + end + + # A condition necessary for an `AccessLevel` to be granted. The Condition is an + # AND over its fields. So a Condition is true if: 1) the request IP is from one + # of the listed subnetworks AND 2) the originating device complies with the + # listed device policy AND 3) all listed access levels are granted AND 4) the + # request was sent at a time allowed by the DateTimeRestriction. + class Condition + include Google::Apis::Core::Hashable + + # `DevicePolicy` specifies device specific restrictions necessary to acquire a + # given access level. A `DevicePolicy` specifies requirements for requests from + # devices to be granted access levels, it does not do any enforcement on the + # device. `DevicePolicy` acts as an AND over all specified fields, and each + # repeated field is an OR over its elements. Any unset fields are ignored. For + # example, if the proto is ` os_type : DESKTOP_WINDOWS, os_type : + # DESKTOP_LINUX, encryption_status: ENCRYPTED`, then the DevicePolicy will be + # true for requests originating from encrypted Linux desktops and encrypted + # Windows desktops. + # Corresponds to the JSON property `devicePolicy` + # @return [Google::Apis::AccesscontextmanagerV1beta::DevicePolicy] + attr_accessor :device_policy + + # CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for + # a CIDR IP address block, the specified IP address portion must be properly + # truncated (i.e. all the host bits must be zero) or the input is considered + # malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is + # not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas + # "2001:db8::1/32" is not. The originating IP of a request must be in one of + # the listed subnets in order for this Condition to be true. If empty, all IP + # addresses are allowed. + # Corresponds to the JSON property `ipSubnetworks` + # @return [Array] + attr_accessor :ip_subnetworks + + # The signed-in user originating the request must be a part of one of the + # provided members. + # Syntax: + # `user:`emailid`` + # `group:`emailid`` + # `serviceAccount:`emailid`` + # If not specified, a request may come from any user (logged in/not logged + # in, not present in any groups, etc.). + # Corresponds to the JSON property `members` + # @return [Array] + attr_accessor :members + + # Whether to negate the Condition. If true, the Condition becomes a NAND over + # its non-empty fields, each field must be false for the Condition overall to + # be satisfied. Defaults to false. + # Corresponds to the JSON property `negate` + # @return [Boolean] + attr_accessor :negate + alias_method :negate?, :negate + + # A list of other access levels defined in the same `Policy`, referenced by + # resource name. Referencing an `AccessLevel` which does not exist is an + # error. All access levels listed must be granted for the Condition + # to be true. Example: + # "`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"` + # Corresponds to the JSON property `requiredAccessLevels` + # @return [Array] + attr_accessor :required_access_levels + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @device_policy = args[:device_policy] if args.key?(:device_policy) + @ip_subnetworks = args[:ip_subnetworks] if args.key?(:ip_subnetworks) + @members = args[:members] if args.key?(:members) + @negate = args[:negate] if args.key?(:negate) + @required_access_levels = args[:required_access_levels] if args.key?(:required_access_levels) + end + end + + # `DevicePolicy` specifies device specific restrictions necessary to acquire a + # given access level. A `DevicePolicy` specifies requirements for requests from + # devices to be granted access levels, it does not do any enforcement on the + # device. `DevicePolicy` acts as an AND over all specified fields, and each + # repeated field is an OR over its elements. Any unset fields are ignored. For + # example, if the proto is ` os_type : DESKTOP_WINDOWS, os_type : + # DESKTOP_LINUX, encryption_status: ENCRYPTED`, then the DevicePolicy will be + # true for requests originating from encrypted Linux desktops and encrypted + # Windows desktops. + class DevicePolicy + include Google::Apis::Core::Hashable + + # Allowed device management levels, an empty list allows all management + # levels. + # Corresponds to the JSON property `allowedDeviceManagementLevels` + # @return [Array] + attr_accessor :allowed_device_management_levels + + # Allowed encryptions statuses, an empty list allows all statuses. + # Corresponds to the JSON property `allowedEncryptionStatuses` + # @return [Array] + attr_accessor :allowed_encryption_statuses + + # Allowed OS versions, an empty list allows all types and all versions. + # Corresponds to the JSON property `osConstraints` + # @return [Array] + attr_accessor :os_constraints + + # Whether or not screenlock is required for the DevicePolicy to be true. + # Defaults to `false`. + # Corresponds to the JSON property `requireScreenlock` + # @return [Boolean] + attr_accessor :require_screenlock + alias_method :require_screenlock?, :require_screenlock + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @allowed_device_management_levels = args[:allowed_device_management_levels] if args.key?(:allowed_device_management_levels) + @allowed_encryption_statuses = args[:allowed_encryption_statuses] if args.key?(:allowed_encryption_statuses) + @os_constraints = args[:os_constraints] if args.key?(:os_constraints) + @require_screenlock = args[:require_screenlock] if args.key?(:require_screenlock) + end + end + + # A response to `ListAccessLevelsRequest`. + class ListAccessLevelsResponse + include Google::Apis::Core::Hashable + + # List of the Access Level instances. + # Corresponds to the JSON property `accessLevels` + # @return [Array] + attr_accessor :access_levels + + # The pagination token to retrieve the next page of results. If the value is + # empty, no further results remain. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @access_levels = args[:access_levels] if args.key?(:access_levels) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # A response to `ListAccessPoliciesRequest`. + class ListAccessPoliciesResponse + include Google::Apis::Core::Hashable + + # List of the AccessPolicy instances. + # Corresponds to the JSON property `accessPolicies` + # @return [Array] + attr_accessor :access_policies + + # The pagination token to retrieve the next page of results. If the value is + # empty, no further results remain. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @access_policies = args[:access_policies] if args.key?(:access_policies) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # A response to `ListServicePerimetersRequest`. + class ListServicePerimetersResponse + include Google::Apis::Core::Hashable + + # The pagination token to retrieve the next page of results. If the value is + # empty, no further results remain. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # List of the Service Perimeter instances. + # Corresponds to the JSON property `servicePerimeters` + # @return [Array] + attr_accessor :service_perimeters + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @service_perimeters = args[:service_perimeters] if args.key?(:service_perimeters) + end + end + + # This resource represents a long-running operation that is the result of a + # network API call. + class Operation + include Google::Apis::Core::Hashable + + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `error` + # @return [Google::Apis::AccesscontextmanagerV1beta::Status] + attr_accessor :error + + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should have the format of `operations/some/unique/name`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + @response = args[:response] if args.key?(:response) + end + end + + # A restriction on the OS type and version of devices making requests. + class OsConstraint + include Google::Apis::Core::Hashable + + # The minimum allowed OS version. If not set, any version of this OS + # satisfies the constraint. Format: `"major.minor.patch"`. + # Examples: `"10.5.301"`, `"9.2.1"`. + # Corresponds to the JSON property `minimumVersion` + # @return [String] + attr_accessor :minimum_version + + # Required. The allowed OS type. + # Corresponds to the JSON property `osType` + # @return [String] + attr_accessor :os_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @minimum_version = args[:minimum_version] if args.key?(:minimum_version) + @os_type = args[:os_type] if args.key?(:os_type) + end + end + + # `ServicePerimeter` describes a set of GCP resources which can freely import + # and export data amongst themselves, but not export outside of the + # `ServicePerimeter`. If a request with a source within this `ServicePerimeter` + # has a target outside of the `ServicePerimeter`, the request will be blocked. + # Otherwise the request is allowed. There are two types of Service Perimeter - + # Regular and Bridge. Regular Service Perimeters cannot overlap, a single GCP + # project can only belong to a single regular Service Perimeter. Service + # Perimeter Bridges can contain only GCP projects as members, a single GCP + # project may belong to multiple Service Perimeter Bridges. + class ServicePerimeter + include Google::Apis::Core::Hashable + + # Output only. Time the `ServicePerimeter` was created in UTC. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Description of the `ServicePerimeter` and its use. Does not affect + # behavior. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Required. Resource name for the ServicePerimeter. The `short_name` + # component must begin with a letter and only include alphanumeric and '_'. + # Format: `accessPolicies/`policy_id`/servicePerimeters/`short_name`` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Perimeter type indicator. A single project is + # allowed to be a member of single regular perimeter, but multiple service + # perimeter bridges. A project cannot be a included in a perimeter bridge + # without being included in regular perimeter. For perimeter bridges, + # restricted/unrestricted service lists as well as access lists must be + # empty. + # Corresponds to the JSON property `perimeterType` + # @return [String] + attr_accessor :perimeter_type + + # `ServicePerimeterConfig` specifies a set of GCP resources that describe + # specific Service Perimeter configuration. + # Corresponds to the JSON property `status` + # @return [Google::Apis::AccesscontextmanagerV1beta::ServicePerimeterConfig] + attr_accessor :status + + # Human readable title. Must be unique within the Policy. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # Output only. Time the `ServicePerimeter` was updated in UTC. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @description = args[:description] if args.key?(:description) + @name = args[:name] if args.key?(:name) + @perimeter_type = args[:perimeter_type] if args.key?(:perimeter_type) + @status = args[:status] if args.key?(:status) + @title = args[:title] if args.key?(:title) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # `ServicePerimeterConfig` specifies a set of GCP resources that describe + # specific Service Perimeter configuration. + class ServicePerimeterConfig + include Google::Apis::Core::Hashable + + # A list of `AccessLevel` resource names that allow resources within the + # `ServicePerimeter` to be accessed from the internet. `AccessLevels` listed + # must be in the same policy as this `ServicePerimeter`. Referencing a + # nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names are + # listed, resources within the perimeter can only be accessed via GCP calls with + # request origins within the perimeter. Example: + # `"accessPolicies/MY_POLICY/accessLevels/MY_LEVEL"`. + # For Service Perimeter Bridge, must be empty. + # Corresponds to the JSON property `accessLevels` + # @return [Array] + attr_accessor :access_levels + + # A list of GCP resources that are inside of the service perimeter. + # Currently only projects are allowed. Format: `projects/`project_number`` + # Corresponds to the JSON property `resources` + # @return [Array] + attr_accessor :resources + + # GCP services that are subject to the Service Perimeter restrictions. May + # contain a list of services or a single wildcard "*". For example, if + # `storage.googleapis.com` is specified, access to the storage buckets + # inside the perimeter must meet the perimeter's access restrictions. + # Wildcard means that unless explicitly specified by "unrestricted_services" + # list, any service is treated as restricted. One of the fields + # "restricted_services", "unrestricted_services" must contain a wildcard "*", + # otherwise the Service Perimeter specification is invalid. It also means + # that both field being empty is invalid as well. "restricted_services" can + # be empty if and only if "unrestricted_services" list contains a "*" + # wildcard. + # Corresponds to the JSON property `restrictedServices` + # @return [Array] + attr_accessor :restricted_services + + # GCP services that are not subject to the Service Perimeter restrictions. + # May contain a list of services or a single wildcard "*". For example, if + # `logging.googleapis.com` is unrestricted, users can access logs inside the + # perimeter as if the perimeter doesn't exist, and it also means VMs inside the + # perimeter + # can access logs outside the perimeter. + # The wildcard means that unless explicitly specified by + # "restricted_services" list, any service is treated as unrestricted. One of + # the fields "restricted_services", "unrestricted_services" must contain a + # wildcard "*", otherwise the Service Perimeter specification is invalid. It + # also means that both field being empty is invalid as well. + # "unrestricted_services" can be empty if and only if "restricted_services" + # list contains a "*" wildcard. + # Corresponds to the JSON property `unrestrictedServices` + # @return [Array] + attr_accessor :unrestricted_services + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @access_levels = args[:access_levels] if args.key?(:access_levels) + @resources = args[:resources] if args.key?(:resources) + @restricted_services = args[:restricted_services] if args.key?(:restricted_services) + @unrestricted_services = args[:unrestricted_services] if args.key?(:unrestricted_services) + end + end + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @details = args[:details] if args.key?(:details) + @message = args[:message] if args.key?(:message) + end + end + end + end +end diff --git a/generated/google/apis/accesscontextmanager_v1beta/representations.rb b/generated/google/apis/accesscontextmanager_v1beta/representations.rb new file mode 100644 index 000000000..bfe843419 --- /dev/null +++ b/generated/google/apis/accesscontextmanager_v1beta/representations.rb @@ -0,0 +1,240 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module AccesscontextmanagerV1beta + + class AccessLevel + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AccessPolicy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BasicLevel + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Condition + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DevicePolicy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListAccessLevelsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListAccessPoliciesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListServicePerimetersResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Operation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OsConstraint + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ServicePerimeter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ServicePerimeterConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AccessLevel + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :basic, as: 'basic', class: Google::Apis::AccesscontextmanagerV1beta::BasicLevel, decorator: Google::Apis::AccesscontextmanagerV1beta::BasicLevel::Representation + + property :create_time, as: 'createTime' + property :description, as: 'description' + property :name, as: 'name' + property :title, as: 'title' + property :update_time, as: 'updateTime' + end + end + + class AccessPolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :name, as: 'name' + property :parent, as: 'parent' + property :title, as: 'title' + property :update_time, as: 'updateTime' + end + end + + class BasicLevel + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :combining_function, as: 'combiningFunction' + collection :conditions, as: 'conditions', class: Google::Apis::AccesscontextmanagerV1beta::Condition, decorator: Google::Apis::AccesscontextmanagerV1beta::Condition::Representation + + end + end + + class Condition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :device_policy, as: 'devicePolicy', class: Google::Apis::AccesscontextmanagerV1beta::DevicePolicy, decorator: Google::Apis::AccesscontextmanagerV1beta::DevicePolicy::Representation + + collection :ip_subnetworks, as: 'ipSubnetworks' + collection :members, as: 'members' + property :negate, as: 'negate' + collection :required_access_levels, as: 'requiredAccessLevels' + end + end + + class DevicePolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :allowed_device_management_levels, as: 'allowedDeviceManagementLevels' + collection :allowed_encryption_statuses, as: 'allowedEncryptionStatuses' + collection :os_constraints, as: 'osConstraints', class: Google::Apis::AccesscontextmanagerV1beta::OsConstraint, decorator: Google::Apis::AccesscontextmanagerV1beta::OsConstraint::Representation + + property :require_screenlock, as: 'requireScreenlock' + end + end + + class ListAccessLevelsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :access_levels, as: 'accessLevels', class: Google::Apis::AccesscontextmanagerV1beta::AccessLevel, decorator: Google::Apis::AccesscontextmanagerV1beta::AccessLevel::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListAccessPoliciesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :access_policies, as: 'accessPolicies', class: Google::Apis::AccesscontextmanagerV1beta::AccessPolicy, decorator: Google::Apis::AccesscontextmanagerV1beta::AccessPolicy::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListServicePerimetersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :service_perimeters, as: 'servicePerimeters', class: Google::Apis::AccesscontextmanagerV1beta::ServicePerimeter, decorator: Google::Apis::AccesscontextmanagerV1beta::ServicePerimeter::Representation + + end + end + + class Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::AccesscontextmanagerV1beta::Status, decorator: Google::Apis::AccesscontextmanagerV1beta::Status::Representation + + hash :metadata, as: 'metadata' + property :name, as: 'name' + hash :response, as: 'response' + end + end + + class OsConstraint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :minimum_version, as: 'minimumVersion' + property :os_type, as: 'osType' + end + end + + class ServicePerimeter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :description, as: 'description' + property :name, as: 'name' + property :perimeter_type, as: 'perimeterType' + property :status, as: 'status', class: Google::Apis::AccesscontextmanagerV1beta::ServicePerimeterConfig, decorator: Google::Apis::AccesscontextmanagerV1beta::ServicePerimeterConfig::Representation + + property :title, as: 'title' + property :update_time, as: 'updateTime' + end + end + + class ServicePerimeterConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :access_levels, as: 'accessLevels' + collection :resources, as: 'resources' + collection :restricted_services, as: 'restrictedServices' + collection :unrestricted_services, as: 'unrestrictedServices' + end + end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + end + end +end diff --git a/generated/google/apis/accesscontextmanager_v1beta/service.rb b/generated/google/apis/accesscontextmanager_v1beta/service.rb new file mode 100644 index 000000000..973c12597 --- /dev/null +++ b/generated/google/apis/accesscontextmanager_v1beta/service.rb @@ -0,0 +1,666 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module AccesscontextmanagerV1beta + # Access Context Manager API + # + # An API for setting attribute based access control to requests to GCP services. + # + # @example + # require 'google/apis/accesscontextmanager_v1beta' + # + # Accesscontextmanager = Google::Apis::AccesscontextmanagerV1beta # Alias the module + # service = Accesscontextmanager::AccessContextManagerService.new + # + # @see https://cloud.google.com/access-context-manager/docs/reference/rest/ + class AccessContextManagerService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://accesscontextmanager.googleapis.com/', '') + @batch_path = 'batch' + end + + # Create an `AccessPolicy`. Fails if this organization already has a + # `AccessPolicy`. The longrunning Operation will have a successful status + # once the `AccessPolicy` has propagated to long-lasting storage. + # Syntactic and basic semantic errors will be returned in `metadata` as a + # BadRequest proto. + # @param [Google::Apis::AccesscontextmanagerV1beta::AccessPolicy] access_policy_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AccesscontextmanagerV1beta::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AccesscontextmanagerV1beta::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_access_policy(access_policy_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta/accessPolicies', options) + command.request_representation = Google::Apis::AccesscontextmanagerV1beta::AccessPolicy::Representation + command.request_object = access_policy_object + command.response_representation = Google::Apis::AccesscontextmanagerV1beta::Operation::Representation + command.response_class = Google::Apis::AccesscontextmanagerV1beta::Operation + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Delete an AccessPolicy by resource + # name. The longrunning Operation will have a successful status once the + # AccessPolicy + # has been removed from long-lasting storage. + # @param [String] name + # Required. Resource name for the access policy to delete. + # Format `accessPolicies/`policy_id`` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AccesscontextmanagerV1beta::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AccesscontextmanagerV1beta::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_access_policy(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta/{+name}', options) + command.response_representation = Google::Apis::AccesscontextmanagerV1beta::Operation::Representation + command.response_class = Google::Apis::AccesscontextmanagerV1beta::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Get an AccessPolicy by name. + # @param [String] name + # Required. Resource name for the access policy to get. + # Format `accessPolicies/`policy_id`` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AccesscontextmanagerV1beta::AccessPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AccesscontextmanagerV1beta::AccessPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_access_policy(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta/{+name}', options) + command.response_representation = Google::Apis::AccesscontextmanagerV1beta::AccessPolicy::Representation + command.response_class = Google::Apis::AccesscontextmanagerV1beta::AccessPolicy + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # List all AccessPolicies under a + # container. + # @param [Fixnum] page_size + # Number of AccessPolicy instances to include in the list. Default 100. + # @param [String] page_token + # Next page token for the next batch of AccessPolicy instances. Defaults to + # the first page of results. + # @param [String] parent + # Required. Resource name for the container to list AccessPolicy instances + # from. + # Format: + # `organizations/`org_id`` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AccesscontextmanagerV1beta::ListAccessPoliciesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AccesscontextmanagerV1beta::ListAccessPoliciesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_access_policies(page_size: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta/accessPolicies', options) + command.response_representation = Google::Apis::AccesscontextmanagerV1beta::ListAccessPoliciesResponse::Representation + command.response_class = Google::Apis::AccesscontextmanagerV1beta::ListAccessPoliciesResponse + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Update an AccessPolicy. The + # longrunning Operation from this RPC will have a successful status once the + # changes to the AccessPolicy have propagated + # to long-lasting storage. Syntactic and basic semantic errors will be + # returned in `metadata` as a BadRequest proto. + # @param [String] name + # Output only. Resource name of the `AccessPolicy`. Format: + # `accessPolicies/`policy_id`` + # @param [Google::Apis::AccesscontextmanagerV1beta::AccessPolicy] access_policy_object + # @param [String] update_mask + # Required. Mask to control which fields get updated. Must be non-empty. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AccesscontextmanagerV1beta::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AccesscontextmanagerV1beta::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_access_policy(name, access_policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1beta/{+name}', options) + command.request_representation = Google::Apis::AccesscontextmanagerV1beta::AccessPolicy::Representation + command.request_object = access_policy_object + command.response_representation = Google::Apis::AccesscontextmanagerV1beta::Operation::Representation + command.response_class = Google::Apis::AccesscontextmanagerV1beta::Operation + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Create an Access Level. The longrunning + # operation from this RPC will have a successful status once the Access + # Level has + # propagated to long-lasting storage. Access Levels containing + # errors will result in an error response for the first error encountered. + # @param [String] parent + # Required. Resource name for the access policy which owns this Access + # Level. + # Format: `accessPolicies/`policy_id`` + # @param [Google::Apis::AccesscontextmanagerV1beta::AccessLevel] access_level_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AccesscontextmanagerV1beta::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AccesscontextmanagerV1beta::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_access_policy_access_level(parent, access_level_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta/{+parent}/accessLevels', options) + command.request_representation = Google::Apis::AccesscontextmanagerV1beta::AccessLevel::Representation + command.request_object = access_level_object + command.response_representation = Google::Apis::AccesscontextmanagerV1beta::Operation::Representation + command.response_class = Google::Apis::AccesscontextmanagerV1beta::Operation + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Delete an Access Level by resource + # name. The longrunning operation from this RPC will have a successful status + # once the Access Level has been removed + # from long-lasting storage. + # @param [String] name + # Required. Resource name for the Access Level. + # Format: + # `accessPolicies/`policy_id`/accessLevels/`access_level_id`` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AccesscontextmanagerV1beta::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AccesscontextmanagerV1beta::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_access_policy_access_level(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta/{+name}', options) + command.response_representation = Google::Apis::AccesscontextmanagerV1beta::Operation::Representation + command.response_class = Google::Apis::AccesscontextmanagerV1beta::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Get an Access Level by resource + # name. + # @param [String] name + # Required. Resource name for the Access Level. + # Format: + # `accessPolicies/`policy_id`/accessLevels/`access_level_id`` + # @param [String] access_level_format + # Whether to return `BasicLevels` in the Cloud Common Expression + # Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where + # Access Levels + # are returned as `BasicLevels` or `CustomLevels` based on how they were + # created. If set to CEL, all Access Levels are returned as + # `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent + # `CustomLevels`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AccesscontextmanagerV1beta::AccessLevel] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AccesscontextmanagerV1beta::AccessLevel] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_access_policy_access_level(name, access_level_format: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta/{+name}', options) + command.response_representation = Google::Apis::AccesscontextmanagerV1beta::AccessLevel::Representation + command.response_class = Google::Apis::AccesscontextmanagerV1beta::AccessLevel + command.params['name'] = name unless name.nil? + command.query['accessLevelFormat'] = access_level_format unless access_level_format.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # List all Access Levels for an access + # policy. + # @param [String] parent + # Required. Resource name for the access policy to list Access Levels from. + # Format: + # `accessPolicies/`policy_id`` + # @param [String] access_level_format + # Whether to return `BasicLevels` in the Cloud Common Expression language, as + # `CustomLevels`, rather than as `BasicLevels`. Defaults to returning + # `AccessLevels` in the format they were defined. + # @param [Fixnum] page_size + # Number of Access Levels to include in + # the list. Default 100. + # @param [String] page_token + # Next page token for the next batch of Access Level instances. + # Defaults to the first page of results. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AccesscontextmanagerV1beta::ListAccessLevelsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AccesscontextmanagerV1beta::ListAccessLevelsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_access_policy_access_levels(parent, access_level_format: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta/{+parent}/accessLevels', options) + command.response_representation = Google::Apis::AccesscontextmanagerV1beta::ListAccessLevelsResponse::Representation + command.response_class = Google::Apis::AccesscontextmanagerV1beta::ListAccessLevelsResponse + command.params['parent'] = parent unless parent.nil? + command.query['accessLevelFormat'] = access_level_format unless access_level_format.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Update an Access Level. The longrunning + # operation from this RPC will have a successful status once the changes to + # the Access Level have propagated + # to long-lasting storage. Access Levels containing + # errors will result in an error response for the first error encountered. + # @param [String] name + # Required. Resource name for the Access Level. The `short_name` component + # must begin with a letter and only include alphanumeric and '_'. Format: + # `accessPolicies/`policy_id`/accessLevels/`short_name`` + # @param [Google::Apis::AccesscontextmanagerV1beta::AccessLevel] access_level_object + # @param [String] update_mask + # Required. Mask to control which fields get updated. Must be non-empty. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AccesscontextmanagerV1beta::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AccesscontextmanagerV1beta::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_access_policy_access_level(name, access_level_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1beta/{+name}', options) + command.request_representation = Google::Apis::AccesscontextmanagerV1beta::AccessLevel::Representation + command.request_object = access_level_object + command.response_representation = Google::Apis::AccesscontextmanagerV1beta::Operation::Representation + command.response_class = Google::Apis::AccesscontextmanagerV1beta::Operation + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Create an Service Perimeter. The + # longrunning operation from this RPC will have a successful status once the + # Service Perimeter has + # propagated to long-lasting storage. Service Perimeters containing + # errors will result in an error response for the first error encountered. + # @param [String] parent + # Required. Resource name for the access policy which owns this Service + # Perimeter. + # Format: `accessPolicies/`policy_id`` + # @param [Google::Apis::AccesscontextmanagerV1beta::ServicePerimeter] service_perimeter_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AccesscontextmanagerV1beta::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AccesscontextmanagerV1beta::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_access_policy_service_perimeter(parent, service_perimeter_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta/{+parent}/servicePerimeters', options) + command.request_representation = Google::Apis::AccesscontextmanagerV1beta::ServicePerimeter::Representation + command.request_object = service_perimeter_object + command.response_representation = Google::Apis::AccesscontextmanagerV1beta::Operation::Representation + command.response_class = Google::Apis::AccesscontextmanagerV1beta::Operation + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Delete an Service Perimeter by resource + # name. The longrunning operation from this RPC will have a successful status + # once the Service Perimeter has been + # removed from long-lasting storage. + # @param [String] name + # Required. Resource name for the Service Perimeter. + # Format: + # `accessPolicies/`policy_id`/servicePerimeters/`service_perimeter_id`` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AccesscontextmanagerV1beta::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AccesscontextmanagerV1beta::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_access_policy_service_perimeter(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta/{+name}', options) + command.response_representation = Google::Apis::AccesscontextmanagerV1beta::Operation::Representation + command.response_class = Google::Apis::AccesscontextmanagerV1beta::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Get an Service Perimeter by resource + # name. + # @param [String] name + # Required. Resource name for the Service Perimeter. + # Format: + # `accessPolicies/`policy_id`/servicePerimeters/`service_perimeters_id`` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AccesscontextmanagerV1beta::ServicePerimeter] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AccesscontextmanagerV1beta::ServicePerimeter] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_access_policy_service_perimeter(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta/{+name}', options) + command.response_representation = Google::Apis::AccesscontextmanagerV1beta::ServicePerimeter::Representation + command.response_class = Google::Apis::AccesscontextmanagerV1beta::ServicePerimeter + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # List all Service Perimeters for an + # access policy. + # @param [String] parent + # Required. Resource name for the access policy to list Service Perimeters from. + # Format: + # `accessPolicies/`policy_id`` + # @param [Fixnum] page_size + # Number of Service Perimeters to include + # in the list. Default 100. + # @param [String] page_token + # Next page token for the next batch of Service Perimeter instances. + # Defaults to the first page of results. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AccesscontextmanagerV1beta::ListServicePerimetersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AccesscontextmanagerV1beta::ListServicePerimetersResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_access_policy_service_perimeters(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta/{+parent}/servicePerimeters', options) + command.response_representation = Google::Apis::AccesscontextmanagerV1beta::ListServicePerimetersResponse::Representation + command.response_class = Google::Apis::AccesscontextmanagerV1beta::ListServicePerimetersResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Update an Service Perimeter. The + # longrunning operation from this RPC will have a successful status once the + # changes to the Service Perimeter have + # propagated to long-lasting storage. Service Perimeter containing + # errors will result in an error response for the first error encountered. + # @param [String] name + # Required. Resource name for the ServicePerimeter. The `short_name` + # component must begin with a letter and only include alphanumeric and '_'. + # Format: `accessPolicies/`policy_id`/servicePerimeters/`short_name`` + # @param [Google::Apis::AccesscontextmanagerV1beta::ServicePerimeter] service_perimeter_object + # @param [String] update_mask + # Required. Mask to control which fields get updated. Must be non-empty. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AccesscontextmanagerV1beta::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AccesscontextmanagerV1beta::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_access_policy_service_perimeter(name, service_perimeter_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1beta/{+name}', options) + command.request_representation = Google::Apis::AccesscontextmanagerV1beta::ServicePerimeter::Representation + command.request_object = service_perimeter_object + command.response_representation = Google::Apis::AccesscontextmanagerV1beta::Operation::Representation + command.response_class = Google::Apis::AccesscontextmanagerV1beta::Operation + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # @param [String] name + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AccesscontextmanagerV1beta::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AccesscontextmanagerV1beta::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta/{+name}', options) + command.response_representation = Google::Apis::AccesscontextmanagerV1beta::Operation::Representation + command.response_class = Google::Apis::AccesscontextmanagerV1beta::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google/apis/cloudasset_v1beta1.rb b/generated/google/apis/cloudasset_v1beta1.rb index b63fd7a1b..004624af4 100644 --- a/generated/google/apis/cloudasset_v1beta1.rb +++ b/generated/google/apis/cloudasset_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://console.cloud.google.com/apis/api/cloudasset.googleapis.com/overview module CloudassetV1beta1 VERSION = 'V1beta1' - REVISION = '20181001' + REVISION = '20181008' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudasset_v1beta1/classes.rb b/generated/google/apis/cloudasset_v1beta1/classes.rb index 21d0dff37..e1462d529 100644 --- a/generated/google/apis/cloudasset_v1beta1/classes.rb +++ b/generated/google/apis/cloudasset_v1beta1/classes.rb @@ -304,11 +304,11 @@ module Google # @return [Google::Apis::CloudassetV1beta1::OutputConfig] attr_accessor :output_config - # Timestamp to take an asset snapshot. This can only be set to a timestamp in - # the past or of the current time. If not specified, the current time will be - # used. Due to delays in resource data collection and indexing, there is a - # volatile window during which running the same query may get different - # results. + # Timestamp to take an asset snapshot. This can only be set to a timestamp + # between 2018-10-02 UTC (inclusive) and the current time. If not specified, + # the current time will be used. Due to delays in resource data collection + # and indexing, there is a volatile window during which running the same + # query may get different results. # Corresponds to the JSON property `readTime` # @return [String] attr_accessor :read_time diff --git a/generated/google/apis/cloudbuild_v1.rb b/generated/google/apis/cloudbuild_v1.rb index 9a57d6d18..2243ee69e 100644 --- a/generated/google/apis/cloudbuild_v1.rb +++ b/generated/google/apis/cloudbuild_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/cloud-build/docs/ module CloudbuildV1 VERSION = 'V1' - REVISION = '20181008' + REVISION = '20181009' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudbuild_v1/classes.rb b/generated/google/apis/cloudbuild_v1/classes.rb index a0437f930..61515dce7 100644 --- a/generated/google/apis/cloudbuild_v1/classes.rb +++ b/generated/google/apis/cloudbuild_v1/classes.rb @@ -362,7 +362,8 @@ module Google # @return [String] attr_accessor :log_streaming_option - # Option to specify the logging mode, which determines where the logs are stored. + # Option to specify the logging mode, which determines where the logs are + # stored. # Corresponds to the JSON property `logging` # @return [String] attr_accessor :logging diff --git a/generated/google/apis/cloudkms_v1.rb b/generated/google/apis/cloudkms_v1.rb index d0822f94c..8a4527404 100644 --- a/generated/google/apis/cloudkms_v1.rb +++ b/generated/google/apis/cloudkms_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/kms/ module CloudkmsV1 VERSION = 'V1' - REVISION = '20180918' + REVISION = '20181005' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/firebaserules_v1.rb b/generated/google/apis/firebaserules_v1.rb index e5b3f06ab..1400d19d7 100644 --- a/generated/google/apis/firebaserules_v1.rb +++ b/generated/google/apis/firebaserules_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://firebase.google.com/docs/storage/security module FirebaserulesV1 VERSION = 'V1' - REVISION = '20180927' + REVISION = '20181005' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/iam_v1.rb b/generated/google/apis/iam_v1.rb index b820d158b..7ff5f626b 100644 --- a/generated/google/apis/iam_v1.rb +++ b/generated/google/apis/iam_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/iam/ module IamV1 VERSION = 'V1' - REVISION = '20180920' + REVISION = '20181005' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/iam_v1/classes.rb b/generated/google/apis/iam_v1/classes.rb index 35c045859..8e56763d5 100644 --- a/generated/google/apis/iam_v1/classes.rb +++ b/generated/google/apis/iam_v1/classes.rb @@ -1106,8 +1106,8 @@ module Google class ServiceAccount include Google::Apis::Core::Hashable - # Optional. A user-specified description of the service account. Must be - # fewer than 100 UTF-8 bytes. + # Optional. A user-specified name for the service account. + # Must be less than or equal to 100 UTF-8 bytes. # Corresponds to the JSON property `displayName` # @return [String] attr_accessor :display_name @@ -1117,7 +1117,8 @@ module Google # @return [String] attr_accessor :email - # Used to perform a consistent read-modify-write. + # Optional. Note: `etag` is an inoperable legacy field that is only returned + # for backwards compatibility. # Corresponds to the JSON property `etag` # NOTE: Values are automatically base64 encoded/decoded in the client library. # @return [String] diff --git a/generated/google/apis/toolresults_v1beta3.rb b/generated/google/apis/toolresults_v1beta3.rb index 2f8606512..4f62c0860 100644 --- a/generated/google/apis/toolresults_v1beta3.rb +++ b/generated/google/apis/toolresults_v1beta3.rb @@ -25,7 +25,7 @@ module Google # @see https://firebase.google.com/docs/test-lab/ module ToolresultsV1beta3 VERSION = 'V1beta3' - REVISION = '20180918' + REVISION = '20181008' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'