chore: Initial generation of separate libraries (#2139)

This commit is contained in:
Daniel Azuma 2020-12-31 19:01:13 -08:00 committed by GitHub
parent 146c765e04
commit 388cc7b0a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4651 changed files with 1653336 additions and 0 deletions

View File

@ -110020,6 +110020,7 @@
"/games:v1/SnapshotExtended/hasConflictingRevisions": has_conflicting_revisions
"/games:v1/SnapshotExtended/headRevision": head_revision
"/games:v1/SnapshotExtended/name": name
"/games:v1/SnapshotExtended/snapshotName": snapshot_name
"/games:v1/SnapshotImage": snapshot_image
"/games:v1/SnapshotImage/height": height
"/games:v1/SnapshotImage/kind": kind
@ -110035,6 +110036,7 @@
"/games:v1/SnapshotMetadata/description": description
"/games:v1/SnapshotMetadata/deviceName": device_name
"/games:v1/SnapshotMetadata/duration": duration
"/games:v1/SnapshotMetadata/gameplayDuration": gameplay_duration
"/games:v1/SnapshotMetadata/lastModifyTime": last_modify_time
"/games:v1/SnapshotMetadata/progressValue": progress_value
"/games:v1/SnapshotMetadata/title": title
@ -119600,6 +119602,7 @@
"/lifesciences:v2beta/Accelerator/type": type
"/lifesciences:v2beta/Action": action
"/lifesciences:v2beta/Action/alwaysRun": always_run
"/lifesciences:v2beta/Action/blockExternalNetwork": block_external_network
"/lifesciences:v2beta/Action/commands": commands
"/lifesciences:v2beta/Action/commands/command": command
"/lifesciences:v2beta/Action/containerName": container_name
@ -122388,6 +122391,215 @@
"/memcache:v1beta2/memcache.projects.locations.operations.list/pageSize": page_size
"/memcache:v1beta2/memcache.projects.locations.operations.list/pageToken": page_token
"/memcache:v1beta2/quotaUser": quota_user
"/metastore:v1alpha/AuditConfig": audit_config
"/metastore:v1alpha/AuditConfig/auditLogConfigs": audit_log_configs
"/metastore:v1alpha/AuditConfig/auditLogConfigs/audit_log_config": audit_log_config
"/metastore:v1alpha/AuditConfig/service": service
"/metastore:v1alpha/AuditLogConfig": audit_log_config
"/metastore:v1alpha/AuditLogConfig/exemptedMembers": exempted_members
"/metastore:v1alpha/AuditLogConfig/exemptedMembers/exempted_member": exempted_member
"/metastore:v1alpha/AuditLogConfig/logType": log_type
"/metastore:v1alpha/Binding": binding
"/metastore:v1alpha/Binding/condition": condition
"/metastore:v1alpha/Binding/members": members
"/metastore:v1alpha/Binding/members/member": member
"/metastore:v1alpha/Binding/role": role
"/metastore:v1alpha/DatabaseDump": database_dump
"/metastore:v1alpha/DatabaseDump/databaseType": database_type
"/metastore:v1alpha/DatabaseDump/gcsUri": gcs_uri
"/metastore:v1alpha/DatabaseDump/sourceDatabase": source_database
"/metastore:v1alpha/Empty": empty
"/metastore:v1alpha/ExportMetadataRequest": export_metadata_request
"/metastore:v1alpha/ExportMetadataRequest/destinationGcsFolder": destination_gcs_folder
"/metastore:v1alpha/ExportMetadataRequest/requestId": request_id
"/metastore:v1alpha/Expr": expr
"/metastore:v1alpha/Expr/description": description
"/metastore:v1alpha/Expr/expression": expression
"/metastore:v1alpha/Expr/location": location
"/metastore:v1alpha/Expr/title": title
"/metastore:v1alpha/GoogleCloudMetastoreV1alphaOperationMetadata": google_cloud_metastore_v1alpha_operation_metadata
"/metastore:v1alpha/GoogleCloudMetastoreV1alphaOperationMetadata/apiVersion": api_version
"/metastore:v1alpha/GoogleCloudMetastoreV1alphaOperationMetadata/createTime": create_time
"/metastore:v1alpha/GoogleCloudMetastoreV1alphaOperationMetadata/endTime": end_time
"/metastore:v1alpha/GoogleCloudMetastoreV1alphaOperationMetadata/requestedCancellation": requested_cancellation
"/metastore:v1alpha/GoogleCloudMetastoreV1alphaOperationMetadata/statusMessage": status_message
"/metastore:v1alpha/GoogleCloudMetastoreV1alphaOperationMetadata/target": target
"/metastore:v1alpha/GoogleCloudMetastoreV1alphaOperationMetadata/verb": verb
"/metastore:v1alpha/HiveMetastoreConfig": hive_metastore_config
"/metastore:v1alpha/HiveMetastoreConfig/configOverrides": config_overrides
"/metastore:v1alpha/HiveMetastoreConfig/configOverrides/config_override": config_override
"/metastore:v1alpha/HiveMetastoreConfig/kerberosConfig": kerberos_config
"/metastore:v1alpha/HiveMetastoreConfig/version": version
"/metastore:v1alpha/HiveMetastoreVersion": hive_metastore_version
"/metastore:v1alpha/HiveMetastoreVersion/isDefault": is_default
"/metastore:v1alpha/HiveMetastoreVersion/version": version
"/metastore:v1alpha/KerberosConfig": kerberos_config
"/metastore:v1alpha/KerberosConfig/keytab": keytab
"/metastore:v1alpha/KerberosConfig/krb5ConfigGcsUri": krb5_config_gcs_uri
"/metastore:v1alpha/KerberosConfig/principal": principal
"/metastore:v1alpha/ListLocationsResponse": list_locations_response
"/metastore:v1alpha/ListLocationsResponse/locations": locations
"/metastore:v1alpha/ListLocationsResponse/locations/location": location
"/metastore:v1alpha/ListLocationsResponse/nextPageToken": next_page_token
"/metastore:v1alpha/ListMetadataImportsResponse": list_metadata_imports_response
"/metastore:v1alpha/ListMetadataImportsResponse/metadataImports": metadata_imports
"/metastore:v1alpha/ListMetadataImportsResponse/metadataImports/metadata_import": metadata_import
"/metastore:v1alpha/ListMetadataImportsResponse/nextPageToken": next_page_token
"/metastore:v1alpha/ListMetadataImportsResponse/unreachable": unreachable
"/metastore:v1alpha/ListMetadataImportsResponse/unreachable/unreachable": unreachable
"/metastore:v1alpha/ListOperationsResponse": list_operations_response
"/metastore:v1alpha/ListOperationsResponse/nextPageToken": next_page_token
"/metastore:v1alpha/ListOperationsResponse/operations": operations
"/metastore:v1alpha/ListOperationsResponse/operations/operation": operation
"/metastore:v1alpha/ListServicesResponse": list_services_response
"/metastore:v1alpha/ListServicesResponse/nextPageToken": next_page_token
"/metastore:v1alpha/ListServicesResponse/services": services
"/metastore:v1alpha/ListServicesResponse/services/service": service
"/metastore:v1alpha/ListServicesResponse/unreachable": unreachable
"/metastore:v1alpha/ListServicesResponse/unreachable/unreachable": unreachable
"/metastore:v1alpha/Location": location
"/metastore:v1alpha/Location/displayName": display_name
"/metastore:v1alpha/Location/labels": labels
"/metastore:v1alpha/Location/labels/label": label
"/metastore:v1alpha/Location/locationId": location_id
"/metastore:v1alpha/Location/metadata": metadata
"/metastore:v1alpha/Location/metadata/metadatum": metadatum
"/metastore:v1alpha/Location/name": name
"/metastore:v1alpha/LocationMetadata": location_metadata
"/metastore:v1alpha/LocationMetadata/supportedHiveMetastoreVersions": supported_hive_metastore_versions
"/metastore:v1alpha/LocationMetadata/supportedHiveMetastoreVersions/supported_hive_metastore_version": supported_hive_metastore_version
"/metastore:v1alpha/MaintenanceWindow": maintenance_window
"/metastore:v1alpha/MaintenanceWindow/dayOfWeek": day_of_week
"/metastore:v1alpha/MaintenanceWindow/hourOfDay": hour_of_day
"/metastore:v1alpha/MetadataExport": metadata_export
"/metastore:v1alpha/MetadataExport/destinationGcsUri": destination_gcs_uri
"/metastore:v1alpha/MetadataExport/endTime": end_time
"/metastore:v1alpha/MetadataExport/startTime": start_time
"/metastore:v1alpha/MetadataExport/state": state
"/metastore:v1alpha/MetadataImport": metadata_import
"/metastore:v1alpha/MetadataImport/createTime": create_time
"/metastore:v1alpha/MetadataImport/databaseDump": database_dump
"/metastore:v1alpha/MetadataImport/description": description
"/metastore:v1alpha/MetadataImport/name": name
"/metastore:v1alpha/MetadataImport/state": state
"/metastore:v1alpha/MetadataImport/updateTime": update_time
"/metastore:v1alpha/MetadataIntegration": metadata_integration
"/metastore:v1alpha/MetadataManagementActivity": metadata_management_activity
"/metastore:v1alpha/MetadataManagementActivity/metadataExports": metadata_exports
"/metastore:v1alpha/MetadataManagementActivity/metadataExports/metadata_export": metadata_export
"/metastore:v1alpha/Operation": operation
"/metastore:v1alpha/Operation/done": done
"/metastore:v1alpha/Operation/error": error
"/metastore:v1alpha/Operation/metadata": metadata
"/metastore:v1alpha/Operation/metadata/metadatum": metadatum
"/metastore:v1alpha/Operation/name": name
"/metastore:v1alpha/Operation/response": response
"/metastore:v1alpha/Operation/response/response": response
"/metastore:v1alpha/Policy": policy
"/metastore:v1alpha/Policy/auditConfigs": audit_configs
"/metastore:v1alpha/Policy/auditConfigs/audit_config": audit_config
"/metastore:v1alpha/Policy/bindings": bindings
"/metastore:v1alpha/Policy/bindings/binding": binding
"/metastore:v1alpha/Policy/etag": etag
"/metastore:v1alpha/Policy/version": version
"/metastore:v1alpha/Secret": secret
"/metastore:v1alpha/Secret/cloudSecret": cloud_secret
"/metastore:v1alpha/Service": service
"/metastore:v1alpha/Service/artifactGcsUri": artifact_gcs_uri
"/metastore:v1alpha/Service/createTime": create_time
"/metastore:v1alpha/Service/endpointUri": endpoint_uri
"/metastore:v1alpha/Service/hiveMetastoreConfig": hive_metastore_config
"/metastore:v1alpha/Service/labels": labels
"/metastore:v1alpha/Service/labels/label": label
"/metastore:v1alpha/Service/maintenanceWindow": maintenance_window
"/metastore:v1alpha/Service/metadataIntegration": metadata_integration
"/metastore:v1alpha/Service/metadataManagementActivity": metadata_management_activity
"/metastore:v1alpha/Service/name": name
"/metastore:v1alpha/Service/network": network
"/metastore:v1alpha/Service/port": port
"/metastore:v1alpha/Service/state": state
"/metastore:v1alpha/Service/stateMessage": state_message
"/metastore:v1alpha/Service/tier": tier
"/metastore:v1alpha/Service/uid": uid
"/metastore:v1alpha/Service/updateTime": update_time
"/metastore:v1alpha/SetIamPolicyRequest": set_iam_policy_request
"/metastore:v1alpha/SetIamPolicyRequest/policy": policy
"/metastore:v1alpha/SetIamPolicyRequest/updateMask": update_mask
"/metastore:v1alpha/Status": status
"/metastore:v1alpha/Status/code": code
"/metastore:v1alpha/Status/details": details
"/metastore:v1alpha/Status/details/detail": detail
"/metastore:v1alpha/Status/details/detail/detail": detail
"/metastore:v1alpha/Status/message": message
"/metastore:v1alpha/TestIamPermissionsRequest": test_iam_permissions_request
"/metastore:v1alpha/TestIamPermissionsRequest/permissions": permissions
"/metastore:v1alpha/TestIamPermissionsRequest/permissions/permission": permission
"/metastore:v1alpha/TestIamPermissionsResponse": test_iam_permissions_response
"/metastore:v1alpha/TestIamPermissionsResponse/permissions": permissions
"/metastore:v1alpha/TestIamPermissionsResponse/permissions/permission": permission
"/metastore:v1alpha/fields": fields
"/metastore:v1alpha/key": key
"/metastore:v1alpha/metastore.projects.locations.get": get_project_location
"/metastore:v1alpha/metastore.projects.locations.get/name": name
"/metastore:v1alpha/metastore.projects.locations.list": list_project_locations
"/metastore:v1alpha/metastore.projects.locations.list/filter": filter
"/metastore:v1alpha/metastore.projects.locations.list/name": name
"/metastore:v1alpha/metastore.projects.locations.list/pageSize": page_size
"/metastore:v1alpha/metastore.projects.locations.list/pageToken": page_token
"/metastore:v1alpha/metastore.projects.locations.operations.delete": delete_project_location_operation
"/metastore:v1alpha/metastore.projects.locations.operations.delete/name": name
"/metastore:v1alpha/metastore.projects.locations.operations.get": get_project_location_operation
"/metastore:v1alpha/metastore.projects.locations.operations.get/name": name
"/metastore:v1alpha/metastore.projects.locations.operations.list": list_project_location_operations
"/metastore:v1alpha/metastore.projects.locations.operations.list/filter": filter
"/metastore:v1alpha/metastore.projects.locations.operations.list/name": name
"/metastore:v1alpha/metastore.projects.locations.operations.list/pageSize": page_size
"/metastore:v1alpha/metastore.projects.locations.operations.list/pageToken": page_token
"/metastore:v1alpha/metastore.projects.locations.services.create": create_project_location_service
"/metastore:v1alpha/metastore.projects.locations.services.create/parent": parent
"/metastore:v1alpha/metastore.projects.locations.services.create/requestId": request_id
"/metastore:v1alpha/metastore.projects.locations.services.create/serviceId": service_id
"/metastore:v1alpha/metastore.projects.locations.services.delete": delete_project_location_service
"/metastore:v1alpha/metastore.projects.locations.services.delete/name": name
"/metastore:v1alpha/metastore.projects.locations.services.delete/requestId": request_id
"/metastore:v1alpha/metastore.projects.locations.services.exportMetadata": export_service_metadata
"/metastore:v1alpha/metastore.projects.locations.services.exportMetadata/service": service
"/metastore:v1alpha/metastore.projects.locations.services.get": get_project_location_service
"/metastore:v1alpha/metastore.projects.locations.services.get/name": name
"/metastore:v1alpha/metastore.projects.locations.services.getIamPolicy": get_project_location_service_iam_policy
"/metastore:v1alpha/metastore.projects.locations.services.getIamPolicy/options.requestedPolicyVersion": options_requested_policy_version
"/metastore:v1alpha/metastore.projects.locations.services.getIamPolicy/resource": resource
"/metastore:v1alpha/metastore.projects.locations.services.list": list_project_location_services
"/metastore:v1alpha/metastore.projects.locations.services.list/filter": filter
"/metastore:v1alpha/metastore.projects.locations.services.list/orderBy": order_by
"/metastore:v1alpha/metastore.projects.locations.services.list/pageSize": page_size
"/metastore:v1alpha/metastore.projects.locations.services.list/pageToken": page_token
"/metastore:v1alpha/metastore.projects.locations.services.list/parent": parent
"/metastore:v1alpha/metastore.projects.locations.services.metadataImports.create": create_project_location_service_metadata_import
"/metastore:v1alpha/metastore.projects.locations.services.metadataImports.create/metadataImportId": metadata_import_id
"/metastore:v1alpha/metastore.projects.locations.services.metadataImports.create/parent": parent
"/metastore:v1alpha/metastore.projects.locations.services.metadataImports.create/requestId": request_id
"/metastore:v1alpha/metastore.projects.locations.services.metadataImports.get": get_project_location_service_metadata_import
"/metastore:v1alpha/metastore.projects.locations.services.metadataImports.get/name": name
"/metastore:v1alpha/metastore.projects.locations.services.metadataImports.list": list_project_location_service_metadata_imports
"/metastore:v1alpha/metastore.projects.locations.services.metadataImports.list/filter": filter
"/metastore:v1alpha/metastore.projects.locations.services.metadataImports.list/orderBy": order_by
"/metastore:v1alpha/metastore.projects.locations.services.metadataImports.list/pageSize": page_size
"/metastore:v1alpha/metastore.projects.locations.services.metadataImports.list/pageToken": page_token
"/metastore:v1alpha/metastore.projects.locations.services.metadataImports.list/parent": parent
"/metastore:v1alpha/metastore.projects.locations.services.metadataImports.patch": patch_project_location_service_metadata_import
"/metastore:v1alpha/metastore.projects.locations.services.metadataImports.patch/name": name
"/metastore:v1alpha/metastore.projects.locations.services.metadataImports.patch/requestId": request_id
"/metastore:v1alpha/metastore.projects.locations.services.metadataImports.patch/updateMask": update_mask
"/metastore:v1alpha/metastore.projects.locations.services.patch": patch_project_location_service
"/metastore:v1alpha/metastore.projects.locations.services.patch/name": name
"/metastore:v1alpha/metastore.projects.locations.services.patch/requestId": request_id
"/metastore:v1alpha/metastore.projects.locations.services.patch/updateMask": update_mask
"/metastore:v1alpha/metastore.projects.locations.services.setIamPolicy": set_service_iam_policy
"/metastore:v1alpha/metastore.projects.locations.services.setIamPolicy/resource": resource
"/metastore:v1alpha/metastore.projects.locations.services.testIamPermissions": test_service_iam_permissions
"/metastore:v1alpha/metastore.projects.locations.services.testIamPermissions/resource": resource
"/metastore:v1alpha/quotaUser": quota_user
"/metastore:v1beta/AuditConfig": audit_config
"/metastore:v1beta/AuditConfig/auditLogConfigs": audit_log_configs
"/metastore:v1beta/AuditConfig/auditLogConfigs/audit_log_config": audit_log_config
@ -131017,6 +131229,7 @@
"/pubsub:v1/Topic/labels/label": label
"/pubsub:v1/Topic/messageStoragePolicy": message_storage_policy
"/pubsub:v1/Topic/name": name
"/pubsub:v1/Topic/satisfiesPzs": satisfies_pzs
"/pubsub:v1/UpdateSnapshotRequest": update_snapshot_request
"/pubsub:v1/UpdateSnapshotRequest/snapshot": snapshot
"/pubsub:v1/UpdateSnapshotRequest/updateMask": update_mask
@ -170325,6 +170538,7 @@
"/youtubePartner:v1/Claim/policy": policy
"/youtubePartner:v1/Claim/status": status
"/youtubePartner:v1/Claim/timeCreated": time_created
"/youtubePartner:v1/Claim/ugcType": ugc_type
"/youtubePartner:v1/Claim/videoId": video_id
"/youtubePartner:v1/ClaimEvent": claim_event
"/youtubePartner:v1/ClaimEvent/kind": kind
@ -170549,6 +170763,8 @@
"/youtubePartner:v1/MediaResponseInfo/dynamicDropzone": dynamic_dropzone
"/youtubePartner:v1/MediaResponseInfo/mediaForDiff": media_for_diff
"/youtubePartner:v1/MediaResponseInfo/requestClass": request_class
"/youtubePartner:v1/MediaResponseInfo/scottyAgentUserId": scotty_agent_user_id
"/youtubePartner:v1/MediaResponseInfo/scottyCustomerLog": scotty_customer_log
"/youtubePartner:v1/MediaResponseInfo/trafficClassField": traffic_class_field
"/youtubePartner:v1/MediaResponseInfo/verifyHashFromHeader": verify_hash_from_header
"/youtubePartner:v1/Metadata": metadata

View File

@ -0,0 +1,2 @@
--color
--format documentation

View File

@ -0,0 +1,12 @@
--hide-void-return
--no-private
--verbose
--markup-provider=redcarpet
--markup=markdown
--main OVERVIEW.md
lib/google/apis/abusiveexperiencereport_v1/*.rb
lib/google/apis/abusiveexperiencereport_v1.rb
-
OVERVIEW.md
CHANGELOG.md
LICENSE.md

View File

@ -0,0 +1,7 @@
# Release history for google-apis-abusiveexperiencereport_v1
### v0.1.0 (2021-01-01)
* Regenerated from discovery document revision 20200803
* Regenerated using generator version 0.1.0

View File

@ -0,0 +1,23 @@
source 'https://rubygems.org'
gemspec
group :development do
gem "bundler", ">= 1.17"
gem "rake", ">= 12.0"
gem "rspec", "~> 3.9"
gem "opencensus", "~> 0.5"
end
platforms :jruby do
group :development do
gem "jruby-openssl"
end
end
platforms :ruby do
group :development do
gem "yard", "~> 0.9", ">= 0.9.25"
gem "redcarpet", "~> 3.5"
end
end

View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@ -0,0 +1,96 @@
# Legacy REST client for version V1 of the Abusive Experience Report API
This is a simple client library for version V1 of the Abusive Experience Report API. It provides:
* A client object that connects to the HTTP/JSON REST endpoint for the service.
* Ruby objects for data structures related to the service.
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
* Control of retry, pagination, and timeouts.
Note that although this client library is supported and will continue to be updated to track changes to the service, it is considered legacy. A more modern client may be available for many Google services, especially Cloud Platform services. See the section below titled *Which client should I use?* for more information.
## Getting started
### Before you begin
There are a few setup steps you need to complete before you can use this library:
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/abusiveexperiencereport.googleapis.com) in the console.
### Installation
Add this line to your application's Gemfile:
```ruby
gem 'google-apis-abusiveexperiencereport_v1', '~> 0.1'
```
And then execute:
```
$ bundle
```
Or install it yourself as:
```
$ gem install google-apis-abusiveexperiencereport_v1
```
### Creating a client object
Once the gem is installed, you can load the client code and instantiate a client.
```ruby
# Load the client
require "google/apis/abusiveexperiencereport_v1"
# Create a client object
client = Google::Apis::AbusiveexperiencereportV1::AbusiveExperienceReportService.new
# Authenticate calls
client.authentication = # ... use the googleauth gem to create credentials
```
See the class reference docs for information on the methods you can call from a client.
## Documentation
More detailed descriptions of the Google legacy REST clients are available in two documents.
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
(Note: the above documents are written for the legacy clients in general, and their examples may not reflect the Abusiveexperiencereport service in particular.)
For reference information on specific calls in the Abusive Experience Report API, see the {Google::Apis::AbusiveexperiencereportV1::AbusiveExperienceReportService class reference docs}.
## Which client should I use?
Google provides two types of Ruby API client libraries: **legacy REST clients** and **modern clients**.
This library, `google-apis-abusiveexperiencereport_v1`, is a legacy REST client. You can identify legacy clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The legacy REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
Modern clients are produced by a modern code generator, combined with hand-crafted functionality for some services. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Cloud Platform services, but do not yet support all the services covered by the legacy clients.
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
**For most users, we recommend the modern client, if one is available.** Compared with legacy clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a legacy client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
The [product documentation](https://developers.google.com/abusive-experience-report/) may provide guidance regarding the preferred client library to use.
## Supported Ruby versions
This library is supported on Ruby 2.5+.
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
## License
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
## Support
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).

View File

@ -0,0 +1,28 @@
require "bundler/gem_tasks"
task :release_gem do
Rake::Task["build"].invoke
Rake::Task["release:rubygem_push"].invoke
end
require 'rake/clean'
CLOBBER.include('coverage', 'doc')
CLEAN.include('.yardoc')
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
begin
require 'yard'
require 'yard/rake/yardoc_task'
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb', 'generated/**/*.rb']
t.options = ['--verbose', '--markup', 'markdown']
end
rescue LoadError
task :yard
puts "YARD not available"
end
task :ci => [:spec, :yard, :build]
task :default => :ci

View File

@ -0,0 +1,32 @@
require File.expand_path("lib/google/apis/abusiveexperiencereport_v1/gem_version", __dir__)
Gem::Specification.new do |gem|
gem.name = "google-apis-abusiveexperiencereport_v1"
gem.version = Google::Apis::AbusiveexperiencereportV1::GEM_VERSION
gem.authors = ["Google LLC"]
gem.email = "googleapis-packages@google.com"
gem.summary = "Legacy REST client for Abusive Experience Report API V1"
gem.description =
"This is the legacy REST client for Abusive Experience Report API V1." \
" Legacy REST clients are simple Ruby libraries that provide access to" \
" Google services via their HTTP REST API endpoints. These libraries are" \
" generated and updated automatically based on the discovery documents" \
" published by the service, and they handle most concerns such as" \
" authentication, pagination, retry, timeouts, and logging. You can use" \
" this client to access the Abusive Experience Report API, but note that some" \
" services may provide a separate modern client that is easier to use."
gem.homepage = "https://github.com/google/google-api-ruby-client"
gem.license = "Apache-2.0"
gem.metadata = {
"bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues",
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-abusiveexperiencereport_v1/CHANGELOG.md",
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-abusiveexperiencereport_v1/v#{Google::Apis::AbusiveexperiencereportV1::GEM_VERSION}",
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-abusiveexperiencereport_v1"
}
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
gem.require_paths = ["lib"]
gem.required_ruby_version = '>= 2.4'
gem.add_runtime_dependency "google-apis-core", "~> 0.1"
end

View File

@ -0,0 +1,15 @@
# Copyright 2020 Google LLC
#
# 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/abusiveexperiencereport_v1"

View File

@ -0,0 +1,34 @@
# Copyright 2020 Google LLC
#
# 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/abusiveexperiencereport_v1/service.rb'
require 'google/apis/abusiveexperiencereport_v1/classes.rb'
require 'google/apis/abusiveexperiencereport_v1/representations.rb'
require 'google/apis/abusiveexperiencereport_v1/gem_version.rb'
module Google
module Apis
# Abusive Experience Report API
#
# Views Abusive Experience Report data, and gets a list of sites that have a
# significant number of abusive experiences.
#
# @see https://developers.google.com/abusive-experience-report/
module AbusiveexperiencereportV1
# Version of the Abusive Experience Report API this client connects to.
# This is NOT the gem version.
VERSION = 'V1'
end
end
end

View File

@ -0,0 +1,107 @@
# Copyright 2020 Google LLC
#
# 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 AbusiveexperiencereportV1
# Response message for GetSiteSummary.
class SiteSummaryResponse
include Google::Apis::Core::Hashable
# The site's Abusive Experience Report status.
# Corresponds to the JSON property `abusiveStatus`
# @return [String]
attr_accessor :abusive_status
# The time at which [enforcement](https://support.google.com/webtools/answer/
# 7538608) against the site began or will begin. Not set when the filter_status
# is OFF.
# Corresponds to the JSON property `enforcementTime`
# @return [String]
attr_accessor :enforcement_time
# The site's [enforcement status](https://support.google.com/webtools/answer/
# 7538608).
# Corresponds to the JSON property `filterStatus`
# @return [String]
attr_accessor :filter_status
# The time at which the site's status last changed.
# Corresponds to the JSON property `lastChangeTime`
# @return [String]
attr_accessor :last_change_time
# A link to the full Abusive Experience Report for the site. Not set in
# ViolatingSitesResponse. Note that you must complete the [Search Console
# verification process](https://support.google.com/webmasters/answer/9008080)
# for the site before you can access the full report.
# Corresponds to the JSON property `reportUrl`
# @return [String]
attr_accessor :report_url
# The name of the reviewed site, e.g. `google.com`.
# Corresponds to the JSON property `reviewedSite`
# @return [String]
attr_accessor :reviewed_site
# Whether the site is currently under review.
# Corresponds to the JSON property `underReview`
# @return [Boolean]
attr_accessor :under_review
alias_method :under_review?, :under_review
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@abusive_status = args[:abusive_status] if args.key?(:abusive_status)
@enforcement_time = args[:enforcement_time] if args.key?(:enforcement_time)
@filter_status = args[:filter_status] if args.key?(:filter_status)
@last_change_time = args[:last_change_time] if args.key?(:last_change_time)
@report_url = args[:report_url] if args.key?(:report_url)
@reviewed_site = args[:reviewed_site] if args.key?(:reviewed_site)
@under_review = args[:under_review] if args.key?(:under_review)
end
end
# Response message for ListViolatingSites.
class ViolatingSitesResponse
include Google::Apis::Core::Hashable
# The list of violating sites.
# Corresponds to the JSON property `violatingSites`
# @return [Array<Google::Apis::AbusiveexperiencereportV1::SiteSummaryResponse>]
attr_accessor :violating_sites
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@violating_sites = args[:violating_sites] if args.key?(:violating_sites)
end
end
end
end
end

View File

@ -0,0 +1,28 @@
# Copyright 2020 Google LLC
#
# 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.
module Google
module Apis
module AbusiveexperiencereportV1
# Version of the google-apis-abusiveexperiencereport_v1 gem
GEM_VERSION = "0.1.0"
# Version of the code generator used to generate this client
GENERATOR_VERSION = "0.1.0"
# Revision of the discovery document this client was generated from
REVISION = "20200803"
end
end
end

View File

@ -0,0 +1,59 @@
# Copyright 2020 Google LLC
#
# 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 AbusiveexperiencereportV1
class SiteSummaryResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ViolatingSitesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SiteSummaryResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :abusive_status, as: 'abusiveStatus'
property :enforcement_time, as: 'enforcementTime'
property :filter_status, as: 'filterStatus'
property :last_change_time, as: 'lastChangeTime'
property :report_url, as: 'reportUrl'
property :reviewed_site, as: 'reviewedSite'
property :under_review, as: 'underReview'
end
end
class ViolatingSitesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :violating_sites, as: 'violatingSites', class: Google::Apis::AbusiveexperiencereportV1::SiteSummaryResponse, decorator: Google::Apis::AbusiveexperiencereportV1::SiteSummaryResponse::Representation
end
end
end
end
end

View File

@ -0,0 +1,118 @@
# Copyright 2020 Google LLC
#
# 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 AbusiveexperiencereportV1
# Abusive Experience Report API
#
# Views Abusive Experience Report data, and gets a list of sites that have a
# significant number of abusive experiences.
#
# @example
# require 'google/apis/abusiveexperiencereport_v1'
#
# Abusiveexperiencereport = Google::Apis::AbusiveexperiencereportV1 # Alias the module
# service = Abusiveexperiencereport::AbusiveExperienceReportService.new
#
# @see https://developers.google.com/abusive-experience-report/
class AbusiveExperienceReportService < 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://abusiveexperiencereport.googleapis.com/', '')
@batch_path = 'batch'
end
# Gets a site's Abusive Experience Report summary.
# @param [String] name
# Required. The name of the site whose summary to get, e.g. `sites/http%3A%2F%
# 2Fwww.google.com%2F`. Format: `sites/`site``
# @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::AbusiveexperiencereportV1::SiteSummaryResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AbusiveexperiencereportV1::SiteSummaryResponse]
#
# @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_site(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::AbusiveexperiencereportV1::SiteSummaryResponse::Representation
command.response_class = Google::Apis::AbusiveexperiencereportV1::SiteSummaryResponse
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
# Lists sites that are failing in the Abusive Experience Report.
# @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::AbusiveexperiencereportV1::ViolatingSitesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AbusiveexperiencereportV1::ViolatingSitesResponse]
#
# @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_violating_sites(fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/violatingSites', options)
command.response_representation = Google::Apis::AbusiveexperiencereportV1::ViolatingSitesResponse::Representation
command.response_class = Google::Apis::AbusiveexperiencereportV1::ViolatingSitesResponse
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

View File

@ -0,0 +1,27 @@
# Copyright 2020 Google LLC
#
# 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 "rspec"
RSpec.describe "Google::Apis::AbusiveexperiencereportV1" do
# Minimal test just to ensure no syntax errors in generated code
it "should load" do
expect do
require "google/apis/abusiveexperiencereport_v1"
end.not_to raise_error
expect do
Google::Apis::AbusiveexperiencereportV1::AbusiveExperienceReportService.new
end.not_to raise_error
end
end

View File

@ -0,0 +1,2 @@
--color
--format documentation

View File

@ -0,0 +1,12 @@
--hide-void-return
--no-private
--verbose
--markup-provider=redcarpet
--markup=markdown
--main OVERVIEW.md
lib/google/apis/acceleratedmobilepageurl_v1/*.rb
lib/google/apis/acceleratedmobilepageurl_v1.rb
-
OVERVIEW.md
CHANGELOG.md
LICENSE.md

View File

@ -0,0 +1,7 @@
# Release history for google-apis-acceleratedmobilepageurl_v1
### v0.1.0 (2021-01-01)
* Regenerated from discovery document revision 20200916
* Regenerated using generator version 0.1.0

View File

@ -0,0 +1,23 @@
source 'https://rubygems.org'
gemspec
group :development do
gem "bundler", ">= 1.17"
gem "rake", ">= 12.0"
gem "rspec", "~> 3.9"
gem "opencensus", "~> 0.5"
end
platforms :jruby do
group :development do
gem "jruby-openssl"
end
end
platforms :ruby do
group :development do
gem "yard", "~> 0.9", ">= 0.9.25"
gem "redcarpet", "~> 3.5"
end
end

View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@ -0,0 +1,96 @@
# Legacy REST client for version V1 of the Accelerated Mobile Pages (AMP) URL API
This is a simple client library for version V1 of the Accelerated Mobile Pages (AMP) URL API. It provides:
* A client object that connects to the HTTP/JSON REST endpoint for the service.
* Ruby objects for data structures related to the service.
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
* Control of retry, pagination, and timeouts.
Note that although this client library is supported and will continue to be updated to track changes to the service, it is considered legacy. A more modern client may be available for many Google services, especially Cloud Platform services. See the section below titled *Which client should I use?* for more information.
## Getting started
### Before you begin
There are a few setup steps you need to complete before you can use this library:
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/acceleratedmobilepageurl.googleapis.com) in the console.
### Installation
Add this line to your application's Gemfile:
```ruby
gem 'google-apis-acceleratedmobilepageurl_v1', '~> 0.1'
```
And then execute:
```
$ bundle
```
Or install it yourself as:
```
$ gem install google-apis-acceleratedmobilepageurl_v1
```
### Creating a client object
Once the gem is installed, you can load the client code and instantiate a client.
```ruby
# Load the client
require "google/apis/acceleratedmobilepageurl_v1"
# Create a client object
client = Google::Apis::AcceleratedmobilepageurlV1::AcceleratedmobilepageurlService.new
# Authenticate calls
client.authentication = # ... use the googleauth gem to create credentials
```
See the class reference docs for information on the methods you can call from a client.
## Documentation
More detailed descriptions of the Google legacy REST clients are available in two documents.
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
(Note: the above documents are written for the legacy clients in general, and their examples may not reflect the Acceleratedmobilepageurl service in particular.)
For reference information on specific calls in the Accelerated Mobile Pages (AMP) URL API, see the {Google::Apis::AcceleratedmobilepageurlV1::AcceleratedmobilepageurlService class reference docs}.
## Which client should I use?
Google provides two types of Ruby API client libraries: **legacy REST clients** and **modern clients**.
This library, `google-apis-acceleratedmobilepageurl_v1`, is a legacy REST client. You can identify legacy clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The legacy REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
Modern clients are produced by a modern code generator, combined with hand-crafted functionality for some services. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Cloud Platform services, but do not yet support all the services covered by the legacy clients.
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
**For most users, we recommend the modern client, if one is available.** Compared with legacy clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a legacy client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
The [product documentation](https://developers.google.com/amp/cache/) may provide guidance regarding the preferred client library to use.
## Supported Ruby versions
This library is supported on Ruby 2.5+.
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
## License
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
## Support
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).

View File

@ -0,0 +1,28 @@
require "bundler/gem_tasks"
task :release_gem do
Rake::Task["build"].invoke
Rake::Task["release:rubygem_push"].invoke
end
require 'rake/clean'
CLOBBER.include('coverage', 'doc')
CLEAN.include('.yardoc')
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
begin
require 'yard'
require 'yard/rake/yardoc_task'
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb', 'generated/**/*.rb']
t.options = ['--verbose', '--markup', 'markdown']
end
rescue LoadError
task :yard
puts "YARD not available"
end
task :ci => [:spec, :yard, :build]
task :default => :ci

View File

@ -0,0 +1,32 @@
require File.expand_path("lib/google/apis/acceleratedmobilepageurl_v1/gem_version", __dir__)
Gem::Specification.new do |gem|
gem.name = "google-apis-acceleratedmobilepageurl_v1"
gem.version = Google::Apis::AcceleratedmobilepageurlV1::GEM_VERSION
gem.authors = ["Google LLC"]
gem.email = "googleapis-packages@google.com"
gem.summary = "Legacy REST client for Accelerated Mobile Pages (AMP) URL API V1"
gem.description =
"This is the legacy REST client for Accelerated Mobile Pages (AMP) URL API V1." \
" Legacy REST clients are simple Ruby libraries that provide access to" \
" Google services via their HTTP REST API endpoints. These libraries are" \
" generated and updated automatically based on the discovery documents" \
" published by the service, and they handle most concerns such as" \
" authentication, pagination, retry, timeouts, and logging. You can use" \
" this client to access the Accelerated Mobile Pages (AMP) URL API, but note that some" \
" services may provide a separate modern client that is easier to use."
gem.homepage = "https://github.com/google/google-api-ruby-client"
gem.license = "Apache-2.0"
gem.metadata = {
"bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues",
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-acceleratedmobilepageurl_v1/CHANGELOG.md",
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-acceleratedmobilepageurl_v1/v#{Google::Apis::AcceleratedmobilepageurlV1::GEM_VERSION}",
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-acceleratedmobilepageurl_v1"
}
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
gem.require_paths = ["lib"]
gem.required_ruby_version = '>= 2.4'
gem.add_runtime_dependency "google-apis-core", "~> 0.1"
end

View File

@ -0,0 +1,15 @@
# Copyright 2020 Google LLC
#
# 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/acceleratedmobilepageurl_v1"

View File

@ -0,0 +1,34 @@
# Copyright 2020 Google LLC
#
# 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/acceleratedmobilepageurl_v1/service.rb'
require 'google/apis/acceleratedmobilepageurl_v1/classes.rb'
require 'google/apis/acceleratedmobilepageurl_v1/representations.rb'
require 'google/apis/acceleratedmobilepageurl_v1/gem_version.rb'
module Google
module Apis
# Accelerated Mobile Pages (AMP) URL API
#
# Retrieves the list of AMP URLs (and equivalent AMP Cache URLs) for a given
# list of public URL(s).
#
# @see https://developers.google.com/amp/cache/
module AcceleratedmobilepageurlV1
# Version of the Accelerated Mobile Pages (AMP) URL API this client connects to.
# This is NOT the gem version.
VERSION = 'V1'
end
end
end

View File

@ -0,0 +1,142 @@
# Copyright 2020 Google LLC
#
# 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 AcceleratedmobilepageurlV1
# AMP URL response for a requested URL.
class AmpUrl
include Google::Apis::Core::Hashable
# The AMP URL pointing to the publisher's web server.
# Corresponds to the JSON property `ampUrl`
# @return [String]
attr_accessor :amp_url
# The [AMP Cache URL](/amp/cache/overview#amp-cache-url-format) pointing to the
# cached document in the Google AMP Cache.
# Corresponds to the JSON property `cdnAmpUrl`
# @return [String]
attr_accessor :cdn_amp_url
# The original non-AMP URL.
# Corresponds to the JSON property `originalUrl`
# @return [String]
attr_accessor :original_url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@amp_url = args[:amp_url] if args.key?(:amp_url)
@cdn_amp_url = args[:cdn_amp_url] if args.key?(:cdn_amp_url)
@original_url = args[:original_url] if args.key?(:original_url)
end
end
# AMP URL Error resource for a requested URL that couldn't be found.
class AmpUrlError
include Google::Apis::Core::Hashable
# The error code of an API call.
# Corresponds to the JSON property `errorCode`
# @return [String]
attr_accessor :error_code
# An optional descriptive error message.
# Corresponds to the JSON property `errorMessage`
# @return [String]
attr_accessor :error_message
# The original non-AMP URL.
# Corresponds to the JSON property `originalUrl`
# @return [String]
attr_accessor :original_url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@error_code = args[:error_code] if args.key?(:error_code)
@error_message = args[:error_message] if args.key?(:error_message)
@original_url = args[:original_url] if args.key?(:original_url)
end
end
# AMP URL request for a batch of URLs.
class BatchGetAmpUrlsRequest
include Google::Apis::Core::Hashable
# The lookup_strategy being requested.
# Corresponds to the JSON property `lookupStrategy`
# @return [String]
attr_accessor :lookup_strategy
# List of URLs to look up for the paired AMP URLs. The URLs are case-sensitive.
# Up to 50 URLs per lookup (see [Usage Limits](/amp/cache/reference/limits)).
# Corresponds to the JSON property `urls`
# @return [Array<String>]
attr_accessor :urls
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@lookup_strategy = args[:lookup_strategy] if args.key?(:lookup_strategy)
@urls = args[:urls] if args.key?(:urls)
end
end
# Batch AMP URL response.
class BatchGetAmpUrlsResponse
include Google::Apis::Core::Hashable
# For each URL in BatchAmpUrlsRequest, the URL response. The response might not
# be in the same order as URLs in the batch request. If BatchAmpUrlsRequest
# contains duplicate URLs, AmpUrl is generated only once.
# Corresponds to the JSON property `ampUrls`
# @return [Array<Google::Apis::AcceleratedmobilepageurlV1::AmpUrl>]
attr_accessor :amp_urls
# The errors for requested URLs that have no AMP URL.
# Corresponds to the JSON property `urlErrors`
# @return [Array<Google::Apis::AcceleratedmobilepageurlV1::AmpUrlError>]
attr_accessor :url_errors
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@amp_urls = args[:amp_urls] if args.key?(:amp_urls)
@url_errors = args[:url_errors] if args.key?(:url_errors)
end
end
end
end
end

View File

@ -0,0 +1,28 @@
# Copyright 2020 Google LLC
#
# 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.
module Google
module Apis
module AcceleratedmobilepageurlV1
# Version of the google-apis-acceleratedmobilepageurl_v1 gem
GEM_VERSION = "0.1.0"
# Version of the code generator used to generate this client
GENERATOR_VERSION = "0.1.0"
# Revision of the discovery document this client was generated from
REVISION = "20200916"
end
end
end

View File

@ -0,0 +1,86 @@
# Copyright 2020 Google LLC
#
# 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 AcceleratedmobilepageurlV1
class AmpUrl
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AmpUrlError
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BatchGetAmpUrlsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BatchGetAmpUrlsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AmpUrl
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :amp_url, as: 'ampUrl'
property :cdn_amp_url, as: 'cdnAmpUrl'
property :original_url, as: 'originalUrl'
end
end
class AmpUrlError
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :error_code, as: 'errorCode'
property :error_message, as: 'errorMessage'
property :original_url, as: 'originalUrl'
end
end
class BatchGetAmpUrlsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :lookup_strategy, as: 'lookupStrategy'
collection :urls, as: 'urls'
end
end
class BatchGetAmpUrlsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :amp_urls, as: 'ampUrls', class: Google::Apis::AcceleratedmobilepageurlV1::AmpUrl, decorator: Google::Apis::AcceleratedmobilepageurlV1::AmpUrl::Representation
collection :url_errors, as: 'urlErrors', class: Google::Apis::AcceleratedmobilepageurlV1::AmpUrlError, decorator: Google::Apis::AcceleratedmobilepageurlV1::AmpUrlError::Representation
end
end
end
end
end

View File

@ -0,0 +1,91 @@
# Copyright 2020 Google LLC
#
# 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 AcceleratedmobilepageurlV1
# Accelerated Mobile Pages (AMP) URL API
#
# Retrieves the list of AMP URLs (and equivalent AMP Cache URLs) for a given
# list of public URL(s).
#
# @example
# require 'google/apis/acceleratedmobilepageurl_v1'
#
# Acceleratedmobilepageurl = Google::Apis::AcceleratedmobilepageurlV1 # Alias the module
# service = Acceleratedmobilepageurl::AcceleratedmobilepageurlService.new
#
# @see https://developers.google.com/amp/cache/
class AcceleratedmobilepageurlService < 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://acceleratedmobilepageurl.googleapis.com/', '')
@batch_path = 'batch'
end
# Returns AMP URL(s) and equivalent [AMP Cache URL(s)](/amp/cache/overview#amp-
# cache-url-format).
# @param [Google::Apis::AcceleratedmobilepageurlV1::BatchGetAmpUrlsRequest] batch_get_amp_urls_request_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::AcceleratedmobilepageurlV1::BatchGetAmpUrlsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AcceleratedmobilepageurlV1::BatchGetAmpUrlsResponse]
#
# @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 batch_get_amp_urls(batch_get_amp_urls_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/ampUrls:batchGet', options)
command.request_representation = Google::Apis::AcceleratedmobilepageurlV1::BatchGetAmpUrlsRequest::Representation
command.request_object = batch_get_amp_urls_request_object
command.response_representation = Google::Apis::AcceleratedmobilepageurlV1::BatchGetAmpUrlsResponse::Representation
command.response_class = Google::Apis::AcceleratedmobilepageurlV1::BatchGetAmpUrlsResponse
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

View File

@ -0,0 +1,27 @@
# Copyright 2020 Google LLC
#
# 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 "rspec"
RSpec.describe "Google::Apis::AcceleratedmobilepageurlV1" do
# Minimal test just to ensure no syntax errors in generated code
it "should load" do
expect do
require "google/apis/acceleratedmobilepageurl_v1"
end.not_to raise_error
expect do
Google::Apis::AcceleratedmobilepageurlV1::AcceleratedmobilepageurlService.new
end.not_to raise_error
end
end

View File

@ -0,0 +1,2 @@
--color
--format documentation

View File

@ -0,0 +1,12 @@
--hide-void-return
--no-private
--verbose
--markup-provider=redcarpet
--markup=markdown
--main OVERVIEW.md
lib/google/apis/accessapproval_v1/*.rb
lib/google/apis/accessapproval_v1.rb
-
OVERVIEW.md
CHANGELOG.md
LICENSE.md

View File

@ -0,0 +1,7 @@
# Release history for google-apis-accessapproval_v1
### v0.1.0 (2021-01-01)
* Regenerated from discovery document revision 20201030
* Regenerated using generator version 0.1.0

View File

@ -0,0 +1,23 @@
source 'https://rubygems.org'
gemspec
group :development do
gem "bundler", ">= 1.17"
gem "rake", ">= 12.0"
gem "rspec", "~> 3.9"
gem "opencensus", "~> 0.5"
end
platforms :jruby do
group :development do
gem "jruby-openssl"
end
end
platforms :ruby do
group :development do
gem "yard", "~> 0.9", ">= 0.9.25"
gem "redcarpet", "~> 3.5"
end
end

View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@ -0,0 +1,96 @@
# Legacy REST client for version V1 of the Access Approval API
This is a simple client library for version V1 of the Access Approval API. It provides:
* A client object that connects to the HTTP/JSON REST endpoint for the service.
* Ruby objects for data structures related to the service.
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
* Control of retry, pagination, and timeouts.
Note that although this client library is supported and will continue to be updated to track changes to the service, it is considered legacy. A more modern client may be available for many Google services, especially Cloud Platform services. See the section below titled *Which client should I use?* for more information.
## Getting started
### Before you begin
There are a few setup steps you need to complete before you can use this library:
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/accessapproval.googleapis.com) in the console.
### Installation
Add this line to your application's Gemfile:
```ruby
gem 'google-apis-accessapproval_v1', '~> 0.1'
```
And then execute:
```
$ bundle
```
Or install it yourself as:
```
$ gem install google-apis-accessapproval_v1
```
### Creating a client object
Once the gem is installed, you can load the client code and instantiate a client.
```ruby
# Load the client
require "google/apis/accessapproval_v1"
# Create a client object
client = Google::Apis::AccessapprovalV1::AccessApprovalService.new
# Authenticate calls
client.authentication = # ... use the googleauth gem to create credentials
```
See the class reference docs for information on the methods you can call from a client.
## Documentation
More detailed descriptions of the Google legacy REST clients are available in two documents.
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
(Note: the above documents are written for the legacy clients in general, and their examples may not reflect the Accessapproval service in particular.)
For reference information on specific calls in the Access Approval API, see the {Google::Apis::AccessapprovalV1::AccessApprovalService class reference docs}.
## Which client should I use?
Google provides two types of Ruby API client libraries: **legacy REST clients** and **modern clients**.
This library, `google-apis-accessapproval_v1`, is a legacy REST client. You can identify legacy clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The legacy REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
Modern clients are produced by a modern code generator, combined with hand-crafted functionality for some services. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Cloud Platform services, but do not yet support all the services covered by the legacy clients.
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
**For most users, we recommend the modern client, if one is available.** Compared with legacy clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a legacy client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
The [product documentation](https://cloud.google.com/access-approval/docs) may provide guidance regarding the preferred client library to use.
## Supported Ruby versions
This library is supported on Ruby 2.5+.
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
## License
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
## Support
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).

View File

@ -0,0 +1,28 @@
require "bundler/gem_tasks"
task :release_gem do
Rake::Task["build"].invoke
Rake::Task["release:rubygem_push"].invoke
end
require 'rake/clean'
CLOBBER.include('coverage', 'doc')
CLEAN.include('.yardoc')
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
begin
require 'yard'
require 'yard/rake/yardoc_task'
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb', 'generated/**/*.rb']
t.options = ['--verbose', '--markup', 'markdown']
end
rescue LoadError
task :yard
puts "YARD not available"
end
task :ci => [:spec, :yard, :build]
task :default => :ci

View File

@ -0,0 +1,32 @@
require File.expand_path("lib/google/apis/accessapproval_v1/gem_version", __dir__)
Gem::Specification.new do |gem|
gem.name = "google-apis-accessapproval_v1"
gem.version = Google::Apis::AccessapprovalV1::GEM_VERSION
gem.authors = ["Google LLC"]
gem.email = "googleapis-packages@google.com"
gem.summary = "Legacy REST client for Access Approval API V1"
gem.description =
"This is the legacy REST client for Access Approval API V1." \
" Legacy REST clients are simple Ruby libraries that provide access to" \
" Google services via their HTTP REST API endpoints. These libraries are" \
" generated and updated automatically based on the discovery documents" \
" published by the service, and they handle most concerns such as" \
" authentication, pagination, retry, timeouts, and logging. You can use" \
" this client to access the Access Approval API, but note that some" \
" services may provide a separate modern client that is easier to use."
gem.homepage = "https://github.com/google/google-api-ruby-client"
gem.license = "Apache-2.0"
gem.metadata = {
"bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues",
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-accessapproval_v1/CHANGELOG.md",
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-accessapproval_v1/v#{Google::Apis::AccessapprovalV1::GEM_VERSION}",
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-accessapproval_v1"
}
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
gem.require_paths = ["lib"]
gem.required_ruby_version = '>= 2.4'
gem.add_runtime_dependency "google-apis-core", "~> 0.1"
end

View File

@ -0,0 +1,15 @@
# Copyright 2020 Google LLC
#
# 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/accessapproval_v1"

View File

@ -0,0 +1,36 @@
# Copyright 2020 Google LLC
#
# 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/accessapproval_v1/service.rb'
require 'google/apis/accessapproval_v1/classes.rb'
require 'google/apis/accessapproval_v1/representations.rb'
require 'google/apis/accessapproval_v1/gem_version.rb'
module Google
module Apis
# Access Approval API
#
# An API for controlling access to data by Google personnel.
#
# @see https://cloud.google.com/access-approval/docs
module AccessapprovalV1
# Version of the Access Approval API this client connects to.
# This is NOT the gem version.
VERSION = 'V1'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

View File

@ -0,0 +1,400 @@
# Copyright 2020 Google LLC
#
# 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 AccessapprovalV1
# Settings on a Project/Folder/Organization related to Access Approval.
class AccessApprovalSettings
include Google::Apis::Core::Hashable
# Output only. This field is read only (not settable via
# UpdateAccessAccessApprovalSettings method). If the field is true, that
# indicates that at least one service is enrolled for Access Approval in one or
# more ancestors of the Project or Folder (this field will always be unset for
# the organization since organizations do not have ancestors).
# Corresponds to the JSON property `enrolledAncestor`
# @return [Boolean]
attr_accessor :enrolled_ancestor
alias_method :enrolled_ancestor?, :enrolled_ancestor
# A list of Google Cloud Services for which the given resource has Access
# Approval enrolled. Access requests for the resource given by name against any
# of these services contained here will be required to have explicit approval.
# If name refers to an organization, enrollment can be done for individual
# services. If name refers to a folder or project, enrollment can only be done
# on an all or nothing basis. If a cloud_product is repeated in this list, the
# first entry will be honored and all following entries will be discarded. A
# maximum of 10 enrolled services will be enforced, to be expanded as the set of
# supported services is expanded.
# Corresponds to the JSON property `enrolledServices`
# @return [Array<Google::Apis::AccessapprovalV1::EnrolledService>]
attr_accessor :enrolled_services
# The resource name of the settings. Format is one of: * "projects/`project`/
# accessApprovalSettings" * "folders/`folder`/accessApprovalSettings" * "
# organizations/`organization`/accessApprovalSettings"
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# A list of email addresses to which notifications relating to approval requests
# should be sent. Notifications relating to a resource will be sent to all
# emails in the settings of ancestor resources of that resource. A maximum of 50
# email addresses are allowed.
# Corresponds to the JSON property `notificationEmails`
# @return [Array<String>]
attr_accessor :notification_emails
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@enrolled_ancestor = args[:enrolled_ancestor] if args.key?(:enrolled_ancestor)
@enrolled_services = args[:enrolled_services] if args.key?(:enrolled_services)
@name = args[:name] if args.key?(:name)
@notification_emails = args[:notification_emails] if args.key?(:notification_emails)
end
end
# Home office and physical location of the principal.
class AccessLocations
include Google::Apis::Core::Hashable
# The "home office" location of the principal. A two-letter country code (ISO
# 3166-1 alpha-2), such as "US", "DE" or "GB" or a region code. In some limited
# situations Google systems may refer refer to a region code instead of a
# country code. Possible Region Codes: * ASI: Asia * EUR: Europe * OCE: Oceania *
# AFR: Africa * NAM: North America * SAM: South America * ANT: Antarctica * ANY:
# Any location
# Corresponds to the JSON property `principalOfficeCountry`
# @return [String]
attr_accessor :principal_office_country
# Physical location of the principal at the time of the access. A two-letter
# country code (ISO 3166-1 alpha-2), such as "US", "DE" or "GB" or a region code.
# In some limited situations Google systems may refer refer to a region code
# instead of a country code. Possible Region Codes: * ASI: Asia * EUR: Europe *
# OCE: Oceania * AFR: Africa * NAM: North America * SAM: South America * ANT:
# Antarctica * ANY: Any location
# Corresponds to the JSON property `principalPhysicalLocationCountry`
# @return [String]
attr_accessor :principal_physical_location_country
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@principal_office_country = args[:principal_office_country] if args.key?(:principal_office_country)
@principal_physical_location_country = args[:principal_physical_location_country] if args.key?(:principal_physical_location_country)
end
end
#
class AccessReason
include Google::Apis::Core::Hashable
# More detail about certain reason types. See comments for each type above.
# Corresponds to the JSON property `detail`
# @return [String]
attr_accessor :detail
# Type of access justification.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@detail = args[:detail] if args.key?(:detail)
@type = args[:type] if args.key?(:type)
end
end
# A request for the customer to approve access to a resource.
class ApprovalRequest
include Google::Apis::Core::Hashable
# A decision that has been made to approve access to a resource.
# Corresponds to the JSON property `approve`
# @return [Google::Apis::AccessapprovalV1::ApproveDecision]
attr_accessor :approve
# A decision that has been made to dismiss an approval request.
# Corresponds to the JSON property `dismiss`
# @return [Google::Apis::AccessapprovalV1::DismissDecision]
attr_accessor :dismiss
# The resource name of the request. Format is "`projects|folders|organizations`/`
# id`/approvalRequests/`approval_request`".
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The time at which approval was requested.
# Corresponds to the JSON property `requestTime`
# @return [String]
attr_accessor :request_time
# The requested expiration for the approval. If the request is approved, access
# will be granted from the time of approval until the expiration time.
# Corresponds to the JSON property `requestedExpiration`
# @return [String]
attr_accessor :requested_expiration
# Home office and physical location of the principal.
# Corresponds to the JSON property `requestedLocations`
# @return [Google::Apis::AccessapprovalV1::AccessLocations]
attr_accessor :requested_locations
# The justification for which approval is being requested.
# Corresponds to the JSON property `requestedReason`
# @return [Google::Apis::AccessapprovalV1::AccessReason]
attr_accessor :requested_reason
# The resource for which approval is being requested. The format of the resource
# name is defined at https://cloud.google.com/apis/design/resource_names. The
# resource name here may either be a "full" resource name (e.g. "//library.
# googleapis.com/shelves/shelf1/books/book2") or a "relative" resource name (e.g.
# "shelves/shelf1/books/book2") as described in the resource name specification.
# Corresponds to the JSON property `requestedResourceName`
# @return [String]
attr_accessor :requested_resource_name
# The properties associated with the resource of the request.
# Corresponds to the JSON property `requestedResourceProperties`
# @return [Google::Apis::AccessapprovalV1::ResourceProperties]
attr_accessor :requested_resource_properties
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@approve = args[:approve] if args.key?(:approve)
@dismiss = args[:dismiss] if args.key?(:dismiss)
@name = args[:name] if args.key?(:name)
@request_time = args[:request_time] if args.key?(:request_time)
@requested_expiration = args[:requested_expiration] if args.key?(:requested_expiration)
@requested_locations = args[:requested_locations] if args.key?(:requested_locations)
@requested_reason = args[:requested_reason] if args.key?(:requested_reason)
@requested_resource_name = args[:requested_resource_name] if args.key?(:requested_resource_name)
@requested_resource_properties = args[:requested_resource_properties] if args.key?(:requested_resource_properties)
end
end
# Request to approve an ApprovalRequest.
class ApproveApprovalRequestMessage
include Google::Apis::Core::Hashable
# The expiration time of this approval.
# Corresponds to the JSON property `expireTime`
# @return [String]
attr_accessor :expire_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@expire_time = args[:expire_time] if args.key?(:expire_time)
end
end
# A decision that has been made to approve access to a resource.
class ApproveDecision
include Google::Apis::Core::Hashable
# The time at which approval was granted.
# Corresponds to the JSON property `approveTime`
# @return [String]
attr_accessor :approve_time
# The time at which the approval expires.
# Corresponds to the JSON property `expireTime`
# @return [String]
attr_accessor :expire_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@approve_time = args[:approve_time] if args.key?(:approve_time)
@expire_time = args[:expire_time] if args.key?(:expire_time)
end
end
# Request to dismiss an approval request.
class DismissApprovalRequestMessage
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# A decision that has been made to dismiss an approval request.
class DismissDecision
include Google::Apis::Core::Hashable
# The time at which the approval request was dismissed.
# Corresponds to the JSON property `dismissTime`
# @return [String]
attr_accessor :dismiss_time
# This field will be true if the ApprovalRequest was implcitly dismissed due to
# inaction by the access approval approvers (the request is not acted on by the
# approvers before the exiration time).
# Corresponds to the JSON property `implicit`
# @return [Boolean]
attr_accessor :implicit
alias_method :implicit?, :implicit
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@dismiss_time = args[:dismiss_time] if args.key?(:dismiss_time)
@implicit = args[:implicit] if args.key?(:implicit)
end
end
# A generic empty message that you can re-use to avoid defining duplicated empty
# messages in your APIs. A typical example is to use it as the request or the
# response type of an API method. For instance: service Foo ` rpc Bar(google.
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
# `Empty` is empty JSON object ````.
class Empty
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Represents the enrollment of a cloud resource into a specific service.
class EnrolledService
include Google::Apis::Core::Hashable
# The product for which Access Approval will be enrolled. Allowed values are
# listed below (case-sensitive): * all * App Engine * BigQuery * Cloud Bigtable *
# Cloud Key Management Service * Compute Engine * Cloud Dataflow * Cloud
# Identity and Access Management * Cloud Pub/Sub * Cloud Storage * Persistent
# Disk Note: These values are supported as input for legacy purposes, but will
# not be returned from the API. * all * appengine.googleapis.com * bigquery.
# googleapis.com * bigtable.googleapis.com * cloudkms.googleapis.com * compute.
# googleapis.com * dataflow.googleapis.com * iam.googleapis.com * pubsub.
# googleapis.com * storage.googleapis.com Calls to UpdateAccessApprovalSettings
# using 'all' or any of the XXX.googleapis.com will be translated to the
# associated product name ('all', 'App Engine', etc.). Note: 'all' will enroll
# the resource in all products supported at both 'GA' and 'Preview' levels. More
# information about levels of support is available at https://cloud.google.com/
# access-approval/docs/supported-services
# Corresponds to the JSON property `cloudProduct`
# @return [String]
attr_accessor :cloud_product
# The enrollment level of the service.
# Corresponds to the JSON property `enrollmentLevel`
# @return [String]
attr_accessor :enrollment_level
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cloud_product = args[:cloud_product] if args.key?(:cloud_product)
@enrollment_level = args[:enrollment_level] if args.key?(:enrollment_level)
end
end
# Response to listing of ApprovalRequest objects.
class ListApprovalRequestsResponse
include Google::Apis::Core::Hashable
# Approval request details.
# Corresponds to the JSON property `approvalRequests`
# @return [Array<Google::Apis::AccessapprovalV1::ApprovalRequest>]
attr_accessor :approval_requests
# Token to retrieve the next page of results, or empty if there are no more.
# 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)
@approval_requests = args[:approval_requests] if args.key?(:approval_requests)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# The properties associated with the resource of the request.
class ResourceProperties
include Google::Apis::Core::Hashable
# Whether an approval will exclude the descendants of the resource being
# requested.
# Corresponds to the JSON property `excludesDescendants`
# @return [Boolean]
attr_accessor :excludes_descendants
alias_method :excludes_descendants?, :excludes_descendants
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@excludes_descendants = args[:excludes_descendants] if args.key?(:excludes_descendants)
end
end
end
end
end

View File

@ -0,0 +1,28 @@
# Copyright 2020 Google LLC
#
# 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.
module Google
module Apis
module AccessapprovalV1
# Version of the google-apis-accessapproval_v1 gem
GEM_VERSION = "0.1.0"
# Version of the code generator used to generate this client
GENERATOR_VERSION = "0.1.0"
# Revision of the discovery document this client was generated from
REVISION = "20201030"
end
end
end

View File

@ -0,0 +1,204 @@
# Copyright 2020 Google LLC
#
# 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 AccessapprovalV1
class AccessApprovalSettings
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AccessLocations
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AccessReason
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ApprovalRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ApproveApprovalRequestMessage
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ApproveDecision
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DismissApprovalRequestMessage
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DismissDecision
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Empty
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class EnrolledService
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListApprovalRequestsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ResourceProperties
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AccessApprovalSettings
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :enrolled_ancestor, as: 'enrolledAncestor'
collection :enrolled_services, as: 'enrolledServices', class: Google::Apis::AccessapprovalV1::EnrolledService, decorator: Google::Apis::AccessapprovalV1::EnrolledService::Representation
property :name, as: 'name'
collection :notification_emails, as: 'notificationEmails'
end
end
class AccessLocations
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :principal_office_country, as: 'principalOfficeCountry'
property :principal_physical_location_country, as: 'principalPhysicalLocationCountry'
end
end
class AccessReason
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :detail, as: 'detail'
property :type, as: 'type'
end
end
class ApprovalRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :approve, as: 'approve', class: Google::Apis::AccessapprovalV1::ApproveDecision, decorator: Google::Apis::AccessapprovalV1::ApproveDecision::Representation
property :dismiss, as: 'dismiss', class: Google::Apis::AccessapprovalV1::DismissDecision, decorator: Google::Apis::AccessapprovalV1::DismissDecision::Representation
property :name, as: 'name'
property :request_time, as: 'requestTime'
property :requested_expiration, as: 'requestedExpiration'
property :requested_locations, as: 'requestedLocations', class: Google::Apis::AccessapprovalV1::AccessLocations, decorator: Google::Apis::AccessapprovalV1::AccessLocations::Representation
property :requested_reason, as: 'requestedReason', class: Google::Apis::AccessapprovalV1::AccessReason, decorator: Google::Apis::AccessapprovalV1::AccessReason::Representation
property :requested_resource_name, as: 'requestedResourceName'
property :requested_resource_properties, as: 'requestedResourceProperties', class: Google::Apis::AccessapprovalV1::ResourceProperties, decorator: Google::Apis::AccessapprovalV1::ResourceProperties::Representation
end
end
class ApproveApprovalRequestMessage
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :expire_time, as: 'expireTime'
end
end
class ApproveDecision
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :approve_time, as: 'approveTime'
property :expire_time, as: 'expireTime'
end
end
class DismissApprovalRequestMessage
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class DismissDecision
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :dismiss_time, as: 'dismissTime'
property :implicit, as: 'implicit'
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class EnrolledService
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :cloud_product, as: 'cloudProduct'
property :enrollment_level, as: 'enrollmentLevel'
end
end
class ListApprovalRequestsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :approval_requests, as: 'approvalRequests', class: Google::Apis::AccessapprovalV1::ApprovalRequest, decorator: Google::Apis::AccessapprovalV1::ApprovalRequest::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class ResourceProperties
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :excludes_descendants, as: 'excludesDescendants'
end
end
end
end
end

View File

@ -0,0 +1,836 @@
# Copyright 2020 Google LLC
#
# 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 AccessapprovalV1
# Access Approval API
#
# An API for controlling access to data by Google personnel.
#
# @example
# require 'google/apis/accessapproval_v1'
#
# Accessapproval = Google::Apis::AccessapprovalV1 # Alias the module
# service = Accessapproval::AccessApprovalService.new
#
# @see https://cloud.google.com/access-approval/docs
class AccessApprovalService < 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://accessapproval.googleapis.com/', '')
@batch_path = 'batch'
end
# Deletes the settings associated with a project, folder, or organization. This
# will have the effect of disabling Access Approval for the project, folder, or
# organization, but only if all ancestors also have Access Approval disabled. If
# Access Approval is enabled at a higher level of the hierarchy, then Access
# Approval will still be enabled at this level as the settings are inherited.
# @param [String] name
# Name of the AccessApprovalSettings to delete.
# @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::AccessapprovalV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::Empty]
#
# @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_folder_access_approval_settings(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/{+name}', options)
command.response_representation = Google::Apis::AccessapprovalV1::Empty::Representation
command.response_class = Google::Apis::AccessapprovalV1::Empty
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
# Gets the settings associated with a project, folder, or organization.
# @param [String] name
# Name of the AccessApprovalSettings to retrieve.
# @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::AccessapprovalV1::AccessApprovalSettings] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::AccessApprovalSettings]
#
# @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_folder_access_approval_settings(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::AccessapprovalV1::AccessApprovalSettings::Representation
command.response_class = Google::Apis::AccessapprovalV1::AccessApprovalSettings
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
# Updates the settings associated with a project, folder, or organization.
# Settings to update are determined by the value of field_mask.
# @param [String] name
# The resource name of the settings. Format is one of: * "projects/`project`/
# accessApprovalSettings" * "folders/`folder`/accessApprovalSettings" * "
# organizations/`organization`/accessApprovalSettings"
# @param [Google::Apis::AccessapprovalV1::AccessApprovalSettings] access_approval_settings_object
# @param [String] update_mask
# The update mask applies to the settings. Only the top level fields of
# AccessApprovalSettings (notification_emails & enrolled_services) are supported.
# For each field, if it is included, the currently stored value will be
# entirely overwritten with the value of the field passed in this request. For
# the `FieldMask` definition, see https://developers.google.com/protocol-buffers/
# docs/reference/google.protobuf#fieldmask If this field is left unset, only the
# notification_emails field will be updated.
# @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::AccessapprovalV1::AccessApprovalSettings] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::AccessApprovalSettings]
#
# @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 update_folder_access_approval_settings(name, access_approval_settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1/{+name}', options)
command.request_representation = Google::Apis::AccessapprovalV1::AccessApprovalSettings::Representation
command.request_object = access_approval_settings_object
command.response_representation = Google::Apis::AccessapprovalV1::AccessApprovalSettings::Representation
command.response_class = Google::Apis::AccessapprovalV1::AccessApprovalSettings
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
# Approves a request and returns the updated ApprovalRequest. Returns NOT_FOUND
# if the request does not exist. Returns FAILED_PRECONDITION if the request
# exists but is not in a pending state.
# @param [String] name
# Name of the approval request to approve.
# @param [Google::Apis::AccessapprovalV1::ApproveApprovalRequestMessage] approve_approval_request_message_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::AccessapprovalV1::ApprovalRequest] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::ApprovalRequest]
#
# @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 approve_folder_approval_request(name, approve_approval_request_message_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:approve', options)
command.request_representation = Google::Apis::AccessapprovalV1::ApproveApprovalRequestMessage::Representation
command.request_object = approve_approval_request_message_object
command.response_representation = Google::Apis::AccessapprovalV1::ApprovalRequest::Representation
command.response_class = Google::Apis::AccessapprovalV1::ApprovalRequest
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
# Dismisses a request. Returns the updated ApprovalRequest. NOTE: This does not
# deny access to the resource if another request has been made and approved. It
# is equivalent in effect to ignoring the request altogether. Returns NOT_FOUND
# if the request does not exist. Returns FAILED_PRECONDITION if the request
# exists but is not in a pending state.
# @param [String] name
# Name of the ApprovalRequest to dismiss.
# @param [Google::Apis::AccessapprovalV1::DismissApprovalRequestMessage] dismiss_approval_request_message_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::AccessapprovalV1::ApprovalRequest] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::ApprovalRequest]
#
# @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 dismiss_folder_approval_request(name, dismiss_approval_request_message_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:dismiss', options)
command.request_representation = Google::Apis::AccessapprovalV1::DismissApprovalRequestMessage::Representation
command.request_object = dismiss_approval_request_message_object
command.response_representation = Google::Apis::AccessapprovalV1::ApprovalRequest::Representation
command.response_class = Google::Apis::AccessapprovalV1::ApprovalRequest
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
# Gets an approval request. Returns NOT_FOUND if the request does not exist.
# @param [String] name
# Name of the approval request to retrieve.
# @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::AccessapprovalV1::ApprovalRequest] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::ApprovalRequest]
#
# @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_folder_approval_request(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::AccessapprovalV1::ApprovalRequest::Representation
command.response_class = Google::Apis::AccessapprovalV1::ApprovalRequest
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
# Lists approval requests associated with a project, folder, or organization.
# Approval requests can be filtered by state (pending, active, dismissed). The
# order is reverse chronological.
# @param [String] parent
# The parent resource. This may be "projects/`project`", "folders/`folder`", or "
# organizations/`organization`".
# @param [String] filter
# A filter on the type of approval requests to retrieve. Must be one of the
# following values: * [not set]: Requests that are pending or have active
# approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE:
# Only active (i.e. currently approved) requests. * DISMISSED: Only requests
# that have been dismissed, or requests that . are not approved and past
# expiration. * EXPIRED: Only requests that have been approved, and the approval
# has expired. * HISTORY: Active, dismissed and expired requests.
# @param [Fixnum] page_size
# Requested page size.
# @param [String] page_token
# A token identifying the page of results to return.
# @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::AccessapprovalV1::ListApprovalRequestsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::ListApprovalRequestsResponse]
#
# @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_folder_approval_requests(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+parent}/approvalRequests', options)
command.response_representation = Google::Apis::AccessapprovalV1::ListApprovalRequestsResponse::Representation
command.response_class = Google::Apis::AccessapprovalV1::ListApprovalRequestsResponse
command.params['parent'] = parent unless parent.nil?
command.query['filter'] = filter unless filter.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
# Deletes the settings associated with a project, folder, or organization. This
# will have the effect of disabling Access Approval for the project, folder, or
# organization, but only if all ancestors also have Access Approval disabled. If
# Access Approval is enabled at a higher level of the hierarchy, then Access
# Approval will still be enabled at this level as the settings are inherited.
# @param [String] name
# Name of the AccessApprovalSettings to delete.
# @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::AccessapprovalV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::Empty]
#
# @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_organization_access_approval_settings(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/{+name}', options)
command.response_representation = Google::Apis::AccessapprovalV1::Empty::Representation
command.response_class = Google::Apis::AccessapprovalV1::Empty
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
# Gets the settings associated with a project, folder, or organization.
# @param [String] name
# Name of the AccessApprovalSettings to retrieve.
# @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::AccessapprovalV1::AccessApprovalSettings] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::AccessApprovalSettings]
#
# @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_organization_access_approval_settings(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::AccessapprovalV1::AccessApprovalSettings::Representation
command.response_class = Google::Apis::AccessapprovalV1::AccessApprovalSettings
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
# Updates the settings associated with a project, folder, or organization.
# Settings to update are determined by the value of field_mask.
# @param [String] name
# The resource name of the settings. Format is one of: * "projects/`project`/
# accessApprovalSettings" * "folders/`folder`/accessApprovalSettings" * "
# organizations/`organization`/accessApprovalSettings"
# @param [Google::Apis::AccessapprovalV1::AccessApprovalSettings] access_approval_settings_object
# @param [String] update_mask
# The update mask applies to the settings. Only the top level fields of
# AccessApprovalSettings (notification_emails & enrolled_services) are supported.
# For each field, if it is included, the currently stored value will be
# entirely overwritten with the value of the field passed in this request. For
# the `FieldMask` definition, see https://developers.google.com/protocol-buffers/
# docs/reference/google.protobuf#fieldmask If this field is left unset, only the
# notification_emails field will be updated.
# @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::AccessapprovalV1::AccessApprovalSettings] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::AccessApprovalSettings]
#
# @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 update_organization_access_approval_settings(name, access_approval_settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1/{+name}', options)
command.request_representation = Google::Apis::AccessapprovalV1::AccessApprovalSettings::Representation
command.request_object = access_approval_settings_object
command.response_representation = Google::Apis::AccessapprovalV1::AccessApprovalSettings::Representation
command.response_class = Google::Apis::AccessapprovalV1::AccessApprovalSettings
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
# Approves a request and returns the updated ApprovalRequest. Returns NOT_FOUND
# if the request does not exist. Returns FAILED_PRECONDITION if the request
# exists but is not in a pending state.
# @param [String] name
# Name of the approval request to approve.
# @param [Google::Apis::AccessapprovalV1::ApproveApprovalRequestMessage] approve_approval_request_message_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::AccessapprovalV1::ApprovalRequest] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::ApprovalRequest]
#
# @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 approve_organization_approval_request(name, approve_approval_request_message_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:approve', options)
command.request_representation = Google::Apis::AccessapprovalV1::ApproveApprovalRequestMessage::Representation
command.request_object = approve_approval_request_message_object
command.response_representation = Google::Apis::AccessapprovalV1::ApprovalRequest::Representation
command.response_class = Google::Apis::AccessapprovalV1::ApprovalRequest
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
# Dismisses a request. Returns the updated ApprovalRequest. NOTE: This does not
# deny access to the resource if another request has been made and approved. It
# is equivalent in effect to ignoring the request altogether. Returns NOT_FOUND
# if the request does not exist. Returns FAILED_PRECONDITION if the request
# exists but is not in a pending state.
# @param [String] name
# Name of the ApprovalRequest to dismiss.
# @param [Google::Apis::AccessapprovalV1::DismissApprovalRequestMessage] dismiss_approval_request_message_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::AccessapprovalV1::ApprovalRequest] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::ApprovalRequest]
#
# @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 dismiss_organization_approval_request(name, dismiss_approval_request_message_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:dismiss', options)
command.request_representation = Google::Apis::AccessapprovalV1::DismissApprovalRequestMessage::Representation
command.request_object = dismiss_approval_request_message_object
command.response_representation = Google::Apis::AccessapprovalV1::ApprovalRequest::Representation
command.response_class = Google::Apis::AccessapprovalV1::ApprovalRequest
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
# Gets an approval request. Returns NOT_FOUND if the request does not exist.
# @param [String] name
# Name of the approval request to retrieve.
# @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::AccessapprovalV1::ApprovalRequest] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::ApprovalRequest]
#
# @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_organization_approval_request(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::AccessapprovalV1::ApprovalRequest::Representation
command.response_class = Google::Apis::AccessapprovalV1::ApprovalRequest
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
# Lists approval requests associated with a project, folder, or organization.
# Approval requests can be filtered by state (pending, active, dismissed). The
# order is reverse chronological.
# @param [String] parent
# The parent resource. This may be "projects/`project`", "folders/`folder`", or "
# organizations/`organization`".
# @param [String] filter
# A filter on the type of approval requests to retrieve. Must be one of the
# following values: * [not set]: Requests that are pending or have active
# approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE:
# Only active (i.e. currently approved) requests. * DISMISSED: Only requests
# that have been dismissed, or requests that . are not approved and past
# expiration. * EXPIRED: Only requests that have been approved, and the approval
# has expired. * HISTORY: Active, dismissed and expired requests.
# @param [Fixnum] page_size
# Requested page size.
# @param [String] page_token
# A token identifying the page of results to return.
# @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::AccessapprovalV1::ListApprovalRequestsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::ListApprovalRequestsResponse]
#
# @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_organization_approval_requests(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+parent}/approvalRequests', options)
command.response_representation = Google::Apis::AccessapprovalV1::ListApprovalRequestsResponse::Representation
command.response_class = Google::Apis::AccessapprovalV1::ListApprovalRequestsResponse
command.params['parent'] = parent unless parent.nil?
command.query['filter'] = filter unless filter.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
# Deletes the settings associated with a project, folder, or organization. This
# will have the effect of disabling Access Approval for the project, folder, or
# organization, but only if all ancestors also have Access Approval disabled. If
# Access Approval is enabled at a higher level of the hierarchy, then Access
# Approval will still be enabled at this level as the settings are inherited.
# @param [String] name
# Name of the AccessApprovalSettings to delete.
# @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::AccessapprovalV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::Empty]
#
# @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_project_access_approval_settings(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/{+name}', options)
command.response_representation = Google::Apis::AccessapprovalV1::Empty::Representation
command.response_class = Google::Apis::AccessapprovalV1::Empty
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
# Gets the settings associated with a project, folder, or organization.
# @param [String] name
# Name of the AccessApprovalSettings to retrieve.
# @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::AccessapprovalV1::AccessApprovalSettings] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::AccessApprovalSettings]
#
# @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_project_access_approval_settings(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::AccessapprovalV1::AccessApprovalSettings::Representation
command.response_class = Google::Apis::AccessapprovalV1::AccessApprovalSettings
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
# Updates the settings associated with a project, folder, or organization.
# Settings to update are determined by the value of field_mask.
# @param [String] name
# The resource name of the settings. Format is one of: * "projects/`project`/
# accessApprovalSettings" * "folders/`folder`/accessApprovalSettings" * "
# organizations/`organization`/accessApprovalSettings"
# @param [Google::Apis::AccessapprovalV1::AccessApprovalSettings] access_approval_settings_object
# @param [String] update_mask
# The update mask applies to the settings. Only the top level fields of
# AccessApprovalSettings (notification_emails & enrolled_services) are supported.
# For each field, if it is included, the currently stored value will be
# entirely overwritten with the value of the field passed in this request. For
# the `FieldMask` definition, see https://developers.google.com/protocol-buffers/
# docs/reference/google.protobuf#fieldmask If this field is left unset, only the
# notification_emails field will be updated.
# @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::AccessapprovalV1::AccessApprovalSettings] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::AccessApprovalSettings]
#
# @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 update_project_access_approval_settings(name, access_approval_settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1/{+name}', options)
command.request_representation = Google::Apis::AccessapprovalV1::AccessApprovalSettings::Representation
command.request_object = access_approval_settings_object
command.response_representation = Google::Apis::AccessapprovalV1::AccessApprovalSettings::Representation
command.response_class = Google::Apis::AccessapprovalV1::AccessApprovalSettings
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
# Approves a request and returns the updated ApprovalRequest. Returns NOT_FOUND
# if the request does not exist. Returns FAILED_PRECONDITION if the request
# exists but is not in a pending state.
# @param [String] name
# Name of the approval request to approve.
# @param [Google::Apis::AccessapprovalV1::ApproveApprovalRequestMessage] approve_approval_request_message_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::AccessapprovalV1::ApprovalRequest] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::ApprovalRequest]
#
# @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 approve_project_approval_request(name, approve_approval_request_message_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:approve', options)
command.request_representation = Google::Apis::AccessapprovalV1::ApproveApprovalRequestMessage::Representation
command.request_object = approve_approval_request_message_object
command.response_representation = Google::Apis::AccessapprovalV1::ApprovalRequest::Representation
command.response_class = Google::Apis::AccessapprovalV1::ApprovalRequest
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
# Dismisses a request. Returns the updated ApprovalRequest. NOTE: This does not
# deny access to the resource if another request has been made and approved. It
# is equivalent in effect to ignoring the request altogether. Returns NOT_FOUND
# if the request does not exist. Returns FAILED_PRECONDITION if the request
# exists but is not in a pending state.
# @param [String] name
# Name of the ApprovalRequest to dismiss.
# @param [Google::Apis::AccessapprovalV1::DismissApprovalRequestMessage] dismiss_approval_request_message_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::AccessapprovalV1::ApprovalRequest] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::ApprovalRequest]
#
# @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 dismiss_project_approval_request(name, dismiss_approval_request_message_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:dismiss', options)
command.request_representation = Google::Apis::AccessapprovalV1::DismissApprovalRequestMessage::Representation
command.request_object = dismiss_approval_request_message_object
command.response_representation = Google::Apis::AccessapprovalV1::ApprovalRequest::Representation
command.response_class = Google::Apis::AccessapprovalV1::ApprovalRequest
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
# Gets an approval request. Returns NOT_FOUND if the request does not exist.
# @param [String] name
# Name of the approval request to retrieve.
# @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::AccessapprovalV1::ApprovalRequest] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::ApprovalRequest]
#
# @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_project_approval_request(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::AccessapprovalV1::ApprovalRequest::Representation
command.response_class = Google::Apis::AccessapprovalV1::ApprovalRequest
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
# Lists approval requests associated with a project, folder, or organization.
# Approval requests can be filtered by state (pending, active, dismissed). The
# order is reverse chronological.
# @param [String] parent
# The parent resource. This may be "projects/`project`", "folders/`folder`", or "
# organizations/`organization`".
# @param [String] filter
# A filter on the type of approval requests to retrieve. Must be one of the
# following values: * [not set]: Requests that are pending or have active
# approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE:
# Only active (i.e. currently approved) requests. * DISMISSED: Only requests
# that have been dismissed, or requests that . are not approved and past
# expiration. * EXPIRED: Only requests that have been approved, and the approval
# has expired. * HISTORY: Active, dismissed and expired requests.
# @param [Fixnum] page_size
# Requested page size.
# @param [String] page_token
# A token identifying the page of results to return.
# @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::AccessapprovalV1::ListApprovalRequestsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AccessapprovalV1::ListApprovalRequestsResponse]
#
# @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_project_approval_requests(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+parent}/approvalRequests', options)
command.response_representation = Google::Apis::AccessapprovalV1::ListApprovalRequestsResponse::Representation
command.response_class = Google::Apis::AccessapprovalV1::ListApprovalRequestsResponse
command.params['parent'] = parent unless parent.nil?
command.query['filter'] = filter unless filter.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
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

View File

@ -0,0 +1,27 @@
# Copyright 2020 Google LLC
#
# 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 "rspec"
RSpec.describe "Google::Apis::AccessapprovalV1" do
# Minimal test just to ensure no syntax errors in generated code
it "should load" do
expect do
require "google/apis/accessapproval_v1"
end.not_to raise_error
expect do
Google::Apis::AccessapprovalV1::AccessApprovalService.new
end.not_to raise_error
end
end

View File

@ -0,0 +1,2 @@
--color
--format documentation

View File

@ -0,0 +1,12 @@
--hide-void-return
--no-private
--verbose
--markup-provider=redcarpet
--markup=markdown
--main OVERVIEW.md
lib/google/apis/accesscontextmanager_v1/*.rb
lib/google/apis/accesscontextmanager_v1.rb
-
OVERVIEW.md
CHANGELOG.md
LICENSE.md

View File

@ -0,0 +1,7 @@
# Release history for google-apis-accesscontextmanager_v1
### v0.1.0 (2021-01-01)
* Regenerated from discovery document revision 20201210
* Regenerated using generator version 0.1.0

View File

@ -0,0 +1,23 @@
source 'https://rubygems.org'
gemspec
group :development do
gem "bundler", ">= 1.17"
gem "rake", ">= 12.0"
gem "rspec", "~> 3.9"
gem "opencensus", "~> 0.5"
end
platforms :jruby do
group :development do
gem "jruby-openssl"
end
end
platforms :ruby do
group :development do
gem "yard", "~> 0.9", ">= 0.9.25"
gem "redcarpet", "~> 3.5"
end
end

View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@ -0,0 +1,96 @@
# Legacy REST client for version V1 of the Access Context Manager API
This is a simple client library for version V1 of the Access Context Manager API. It provides:
* A client object that connects to the HTTP/JSON REST endpoint for the service.
* Ruby objects for data structures related to the service.
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
* Control of retry, pagination, and timeouts.
Note that although this client library is supported and will continue to be updated to track changes to the service, it is considered legacy. A more modern client may be available for many Google services, especially Cloud Platform services. See the section below titled *Which client should I use?* for more information.
## Getting started
### Before you begin
There are a few setup steps you need to complete before you can use this library:
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/accesscontextmanager.googleapis.com) in the console.
### Installation
Add this line to your application's Gemfile:
```ruby
gem 'google-apis-accesscontextmanager_v1', '~> 0.1'
```
And then execute:
```
$ bundle
```
Or install it yourself as:
```
$ gem install google-apis-accesscontextmanager_v1
```
### Creating a client object
Once the gem is installed, you can load the client code and instantiate a client.
```ruby
# Load the client
require "google/apis/accesscontextmanager_v1"
# Create a client object
client = Google::Apis::AccesscontextmanagerV1::AccessContextManagerService.new
# Authenticate calls
client.authentication = # ... use the googleauth gem to create credentials
```
See the class reference docs for information on the methods you can call from a client.
## Documentation
More detailed descriptions of the Google legacy REST clients are available in two documents.
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
(Note: the above documents are written for the legacy clients in general, and their examples may not reflect the Accesscontextmanager service in particular.)
For reference information on specific calls in the Access Context Manager API, see the {Google::Apis::AccesscontextmanagerV1::AccessContextManagerService class reference docs}.
## Which client should I use?
Google provides two types of Ruby API client libraries: **legacy REST clients** and **modern clients**.
This library, `google-apis-accesscontextmanager_v1`, is a legacy REST client. You can identify legacy clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The legacy REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
Modern clients are produced by a modern code generator, combined with hand-crafted functionality for some services. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Cloud Platform services, but do not yet support all the services covered by the legacy clients.
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
**For most users, we recommend the modern client, if one is available.** Compared with legacy clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a legacy client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
The [product documentation](https://cloud.google.com/access-context-manager/docs/reference/rest/) may provide guidance regarding the preferred client library to use.
## Supported Ruby versions
This library is supported on Ruby 2.5+.
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
## License
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
## Support
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).

View File

@ -0,0 +1,28 @@
require "bundler/gem_tasks"
task :release_gem do
Rake::Task["build"].invoke
Rake::Task["release:rubygem_push"].invoke
end
require 'rake/clean'
CLOBBER.include('coverage', 'doc')
CLEAN.include('.yardoc')
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
begin
require 'yard'
require 'yard/rake/yardoc_task'
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb', 'generated/**/*.rb']
t.options = ['--verbose', '--markup', 'markdown']
end
rescue LoadError
task :yard
puts "YARD not available"
end
task :ci => [:spec, :yard, :build]
task :default => :ci

View File

@ -0,0 +1,32 @@
require File.expand_path("lib/google/apis/accesscontextmanager_v1/gem_version", __dir__)
Gem::Specification.new do |gem|
gem.name = "google-apis-accesscontextmanager_v1"
gem.version = Google::Apis::AccesscontextmanagerV1::GEM_VERSION
gem.authors = ["Google LLC"]
gem.email = "googleapis-packages@google.com"
gem.summary = "Legacy REST client for Access Context Manager API V1"
gem.description =
"This is the legacy REST client for Access Context Manager API V1." \
" Legacy REST clients are simple Ruby libraries that provide access to" \
" Google services via their HTTP REST API endpoints. These libraries are" \
" generated and updated automatically based on the discovery documents" \
" published by the service, and they handle most concerns such as" \
" authentication, pagination, retry, timeouts, and logging. You can use" \
" this client to access the Access Context Manager API, but note that some" \
" services may provide a separate modern client that is easier to use."
gem.homepage = "https://github.com/google/google-api-ruby-client"
gem.license = "Apache-2.0"
gem.metadata = {
"bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues",
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-accesscontextmanager_v1/CHANGELOG.md",
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-accesscontextmanager_v1/v#{Google::Apis::AccesscontextmanagerV1::GEM_VERSION}",
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-accesscontextmanager_v1"
}
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
gem.require_paths = ["lib"]
gem.required_ruby_version = '>= 2.4'
gem.add_runtime_dependency "google-apis-core", "~> 0.1"
end

View File

@ -0,0 +1,15 @@
# Copyright 2020 Google LLC
#
# 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_v1"

View File

@ -0,0 +1,36 @@
# Copyright 2020 Google LLC
#
# 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_v1/service.rb'
require 'google/apis/accesscontextmanager_v1/classes.rb'
require 'google/apis/accesscontextmanager_v1/representations.rb'
require 'google/apis/accesscontextmanager_v1/gem_version.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 AccesscontextmanagerV1
# Version of the Access Context Manager API this client connects to.
# This is NOT the gem version.
VERSION = 'V1'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

View File

@ -0,0 +1,28 @@
# Copyright 2020 Google LLC
#
# 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.
module Google
module Apis
module AccesscontextmanagerV1
# Version of the google-apis-accesscontextmanager_v1 gem
GEM_VERSION = "0.1.0"
# Version of the code generator used to generate this client
GENERATOR_VERSION = "0.1.0"
# Revision of the discovery document this client was generated from
REVISION = "20201210"
end
end
end

View File

@ -0,0 +1,582 @@
# Copyright 2020 Google LLC
#
# 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 AccesscontextmanagerV1
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 ApiOperation
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 CancelOperationRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CommitServicePerimetersRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CommitServicePerimetersResponse
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 CustomLevel
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 EgressFrom
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class EgressPolicy
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class EgressTo
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Empty
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Expr
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GcpUserAccessBinding
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class IngressFrom
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class IngressPolicy
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class IngressSource
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class IngressTo
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 ListGcpUserAccessBindingsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListOperationsResponse
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 MethodSelector
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 ReplaceAccessLevelsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReplaceAccessLevelsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReplaceServicePerimetersRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReplaceServicePerimetersResponse
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 VpcAccessibleServices
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::AccesscontextmanagerV1::BasicLevel, decorator: Google::Apis::AccesscontextmanagerV1::BasicLevel::Representation
property :custom, as: 'custom', class: Google::Apis::AccesscontextmanagerV1::CustomLevel, decorator: Google::Apis::AccesscontextmanagerV1::CustomLevel::Representation
property :description, as: 'description'
property :name, as: 'name'
property :title, as: 'title'
end
end
class AccessPolicy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :name, as: 'name'
property :parent, as: 'parent'
property :title, as: 'title'
end
end
class ApiOperation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :method_selectors, as: 'methodSelectors', class: Google::Apis::AccesscontextmanagerV1::MethodSelector, decorator: Google::Apis::AccesscontextmanagerV1::MethodSelector::Representation
property :service_name, as: 'serviceName'
end
end
class BasicLevel
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :combining_function, as: 'combiningFunction'
collection :conditions, as: 'conditions', class: Google::Apis::AccesscontextmanagerV1::Condition, decorator: Google::Apis::AccesscontextmanagerV1::Condition::Representation
end
end
class CancelOperationRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class CommitServicePerimetersRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
end
end
class CommitServicePerimetersResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :service_perimeters, as: 'servicePerimeters', class: Google::Apis::AccesscontextmanagerV1::ServicePerimeter, decorator: Google::Apis::AccesscontextmanagerV1::ServicePerimeter::Representation
end
end
class Condition
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :device_policy, as: 'devicePolicy', class: Google::Apis::AccesscontextmanagerV1::DevicePolicy, decorator: Google::Apis::AccesscontextmanagerV1::DevicePolicy::Representation
collection :ip_subnetworks, as: 'ipSubnetworks'
collection :members, as: 'members'
property :negate, as: 'negate'
collection :regions, as: 'regions'
collection :required_access_levels, as: 'requiredAccessLevels'
end
end
class CustomLevel
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :expr, as: 'expr', class: Google::Apis::AccesscontextmanagerV1::Expr, decorator: Google::Apis::AccesscontextmanagerV1::Expr::Representation
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::AccesscontextmanagerV1::OsConstraint, decorator: Google::Apis::AccesscontextmanagerV1::OsConstraint::Representation
property :require_admin_approval, as: 'requireAdminApproval'
property :require_corp_owned, as: 'requireCorpOwned'
property :require_screenlock, as: 'requireScreenlock'
end
end
class EgressFrom
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :identities, as: 'identities'
property :identity_type, as: 'identityType'
end
end
class EgressPolicy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :egress_from, as: 'egressFrom', class: Google::Apis::AccesscontextmanagerV1::EgressFrom, decorator: Google::Apis::AccesscontextmanagerV1::EgressFrom::Representation
property :egress_to, as: 'egressTo', class: Google::Apis::AccesscontextmanagerV1::EgressTo, decorator: Google::Apis::AccesscontextmanagerV1::EgressTo::Representation
end
end
class EgressTo
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :operations, as: 'operations', class: Google::Apis::AccesscontextmanagerV1::ApiOperation, decorator: Google::Apis::AccesscontextmanagerV1::ApiOperation::Representation
collection :resources, as: 'resources'
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Expr
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
property :expression, as: 'expression'
property :location, as: 'location'
property :title, as: 'title'
end
end
class GcpUserAccessBinding
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :access_levels, as: 'accessLevels'
property :group_key, as: 'groupKey'
property :name, as: 'name'
end
end
class IngressFrom
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :identities, as: 'identities'
property :identity_type, as: 'identityType'
collection :sources, as: 'sources', class: Google::Apis::AccesscontextmanagerV1::IngressSource, decorator: Google::Apis::AccesscontextmanagerV1::IngressSource::Representation
end
end
class IngressPolicy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :ingress_from, as: 'ingressFrom', class: Google::Apis::AccesscontextmanagerV1::IngressFrom, decorator: Google::Apis::AccesscontextmanagerV1::IngressFrom::Representation
property :ingress_to, as: 'ingressTo', class: Google::Apis::AccesscontextmanagerV1::IngressTo, decorator: Google::Apis::AccesscontextmanagerV1::IngressTo::Representation
end
end
class IngressSource
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :access_level, as: 'accessLevel'
property :resource, as: 'resource'
end
end
class IngressTo
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :operations, as: 'operations', class: Google::Apis::AccesscontextmanagerV1::ApiOperation, decorator: Google::Apis::AccesscontextmanagerV1::ApiOperation::Representation
collection :resources, as: 'resources'
end
end
class ListAccessLevelsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :access_levels, as: 'accessLevels', class: Google::Apis::AccesscontextmanagerV1::AccessLevel, decorator: Google::Apis::AccesscontextmanagerV1::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::AccesscontextmanagerV1::AccessPolicy, decorator: Google::Apis::AccesscontextmanagerV1::AccessPolicy::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class ListGcpUserAccessBindingsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :gcp_user_access_bindings, as: 'gcpUserAccessBindings', class: Google::Apis::AccesscontextmanagerV1::GcpUserAccessBinding, decorator: Google::Apis::AccesscontextmanagerV1::GcpUserAccessBinding::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class ListOperationsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :operations, as: 'operations', class: Google::Apis::AccesscontextmanagerV1::Operation, decorator: Google::Apis::AccesscontextmanagerV1::Operation::Representation
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::AccesscontextmanagerV1::ServicePerimeter, decorator: Google::Apis::AccesscontextmanagerV1::ServicePerimeter::Representation
end
end
class MethodSelector
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :method_prop, as: 'method'
property :permission, as: 'permission'
end
end
class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :done, as: 'done'
property :error, as: 'error', class: Google::Apis::AccesscontextmanagerV1::Status, decorator: Google::Apis::AccesscontextmanagerV1::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'
property :require_verified_chrome_os, as: 'requireVerifiedChromeOs'
end
end
class ReplaceAccessLevelsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :access_levels, as: 'accessLevels', class: Google::Apis::AccesscontextmanagerV1::AccessLevel, decorator: Google::Apis::AccesscontextmanagerV1::AccessLevel::Representation
property :etag, as: 'etag'
end
end
class ReplaceAccessLevelsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :access_levels, as: 'accessLevels', class: Google::Apis::AccesscontextmanagerV1::AccessLevel, decorator: Google::Apis::AccesscontextmanagerV1::AccessLevel::Representation
end
end
class ReplaceServicePerimetersRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :service_perimeters, as: 'servicePerimeters', class: Google::Apis::AccesscontextmanagerV1::ServicePerimeter, decorator: Google::Apis::AccesscontextmanagerV1::ServicePerimeter::Representation
end
end
class ReplaceServicePerimetersResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :service_perimeters, as: 'servicePerimeters', class: Google::Apis::AccesscontextmanagerV1::ServicePerimeter, decorator: Google::Apis::AccesscontextmanagerV1::ServicePerimeter::Representation
end
end
class ServicePerimeter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
property :name, as: 'name'
property :perimeter_type, as: 'perimeterType'
property :spec, as: 'spec', class: Google::Apis::AccesscontextmanagerV1::ServicePerimeterConfig, decorator: Google::Apis::AccesscontextmanagerV1::ServicePerimeterConfig::Representation
property :status, as: 'status', class: Google::Apis::AccesscontextmanagerV1::ServicePerimeterConfig, decorator: Google::Apis::AccesscontextmanagerV1::ServicePerimeterConfig::Representation
property :title, as: 'title'
property :use_explicit_dry_run_spec, as: 'useExplicitDryRunSpec'
end
end
class ServicePerimeterConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :access_levels, as: 'accessLevels'
collection :egress_policies, as: 'egressPolicies', class: Google::Apis::AccesscontextmanagerV1::EgressPolicy, decorator: Google::Apis::AccesscontextmanagerV1::EgressPolicy::Representation
collection :ingress_policies, as: 'ingressPolicies', class: Google::Apis::AccesscontextmanagerV1::IngressPolicy, decorator: Google::Apis::AccesscontextmanagerV1::IngressPolicy::Representation
collection :resources, as: 'resources'
collection :restricted_services, as: 'restrictedServices'
property :vpc_accessible_services, as: 'vpcAccessibleServices', class: Google::Apis::AccesscontextmanagerV1::VpcAccessibleServices, decorator: Google::Apis::AccesscontextmanagerV1::VpcAccessibleServices::Representation
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
class VpcAccessibleServices
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :allowed_services, as: 'allowedServices'
property :enable_restriction, as: 'enableRestriction'
end
end
end
end
end

View File

@ -0,0 +1,27 @@
# Copyright 2020 Google LLC
#
# 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 "rspec"
RSpec.describe "Google::Apis::AccesscontextmanagerV1" do
# Minimal test just to ensure no syntax errors in generated code
it "should load" do
expect do
require "google/apis/accesscontextmanager_v1"
end.not_to raise_error
expect do
Google::Apis::AccesscontextmanagerV1::AccessContextManagerService.new
end.not_to raise_error
end
end

View File

@ -0,0 +1,2 @@
--color
--format documentation

View File

@ -0,0 +1,12 @@
--hide-void-return
--no-private
--verbose
--markup-provider=redcarpet
--markup=markdown
--main OVERVIEW.md
lib/google/apis/accesscontextmanager_v1beta/*.rb
lib/google/apis/accesscontextmanager_v1beta.rb
-
OVERVIEW.md
CHANGELOG.md
LICENSE.md

View File

@ -0,0 +1,7 @@
# Release history for google-apis-accesscontextmanager_v1beta
### v0.1.0 (2021-01-01)
* Regenerated from discovery document revision 20200825
* Regenerated using generator version 0.1.0

View File

@ -0,0 +1,23 @@
source 'https://rubygems.org'
gemspec
group :development do
gem "bundler", ">= 1.17"
gem "rake", ">= 12.0"
gem "rspec", "~> 3.9"
gem "opencensus", "~> 0.5"
end
platforms :jruby do
group :development do
gem "jruby-openssl"
end
end
platforms :ruby do
group :development do
gem "yard", "~> 0.9", ">= 0.9.25"
gem "redcarpet", "~> 3.5"
end
end

View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@ -0,0 +1,96 @@
# Legacy REST client for version V1beta of the Access Context Manager API
This is a simple client library for version V1beta of the Access Context Manager API. It provides:
* A client object that connects to the HTTP/JSON REST endpoint for the service.
* Ruby objects for data structures related to the service.
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
* Control of retry, pagination, and timeouts.
Note that although this client library is supported and will continue to be updated to track changes to the service, it is considered legacy. A more modern client may be available for many Google services, especially Cloud Platform services. See the section below titled *Which client should I use?* for more information.
## Getting started
### Before you begin
There are a few setup steps you need to complete before you can use this library:
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/accesscontextmanager.googleapis.com) in the console.
### Installation
Add this line to your application's Gemfile:
```ruby
gem 'google-apis-accesscontextmanager_v1beta', '~> 0.1'
```
And then execute:
```
$ bundle
```
Or install it yourself as:
```
$ gem install google-apis-accesscontextmanager_v1beta
```
### Creating a client object
Once the gem is installed, you can load the client code and instantiate a client.
```ruby
# Load the client
require "google/apis/accesscontextmanager_v1beta"
# Create a client object
client = Google::Apis::AccesscontextmanagerV1beta::AccessContextManagerService.new
# Authenticate calls
client.authentication = # ... use the googleauth gem to create credentials
```
See the class reference docs for information on the methods you can call from a client.
## Documentation
More detailed descriptions of the Google legacy REST clients are available in two documents.
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
(Note: the above documents are written for the legacy clients in general, and their examples may not reflect the Accesscontextmanager service in particular.)
For reference information on specific calls in the Access Context Manager API, see the {Google::Apis::AccesscontextmanagerV1beta::AccessContextManagerService class reference docs}.
## Which client should I use?
Google provides two types of Ruby API client libraries: **legacy REST clients** and **modern clients**.
This library, `google-apis-accesscontextmanager_v1beta`, is a legacy REST client. You can identify legacy clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The legacy REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
Modern clients are produced by a modern code generator, combined with hand-crafted functionality for some services. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Cloud Platform services, but do not yet support all the services covered by the legacy clients.
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
**For most users, we recommend the modern client, if one is available.** Compared with legacy clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a legacy client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
The [product documentation](https://cloud.google.com/access-context-manager/docs/reference/rest/) may provide guidance regarding the preferred client library to use.
## Supported Ruby versions
This library is supported on Ruby 2.5+.
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
## License
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
## Support
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).

View File

@ -0,0 +1,28 @@
require "bundler/gem_tasks"
task :release_gem do
Rake::Task["build"].invoke
Rake::Task["release:rubygem_push"].invoke
end
require 'rake/clean'
CLOBBER.include('coverage', 'doc')
CLEAN.include('.yardoc')
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
begin
require 'yard'
require 'yard/rake/yardoc_task'
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb', 'generated/**/*.rb']
t.options = ['--verbose', '--markup', 'markdown']
end
rescue LoadError
task :yard
puts "YARD not available"
end
task :ci => [:spec, :yard, :build]
task :default => :ci

View File

@ -0,0 +1,32 @@
require File.expand_path("lib/google/apis/accesscontextmanager_v1beta/gem_version", __dir__)
Gem::Specification.new do |gem|
gem.name = "google-apis-accesscontextmanager_v1beta"
gem.version = Google::Apis::AccesscontextmanagerV1beta::GEM_VERSION
gem.authors = ["Google LLC"]
gem.email = "googleapis-packages@google.com"
gem.summary = "Legacy REST client for Access Context Manager API V1beta"
gem.description =
"This is the legacy REST client for Access Context Manager API V1beta." \
" Legacy REST clients are simple Ruby libraries that provide access to" \
" Google services via their HTTP REST API endpoints. These libraries are" \
" generated and updated automatically based on the discovery documents" \
" published by the service, and they handle most concerns such as" \
" authentication, pagination, retry, timeouts, and logging. You can use" \
" this client to access the Access Context Manager API, but note that some" \
" services may provide a separate modern client that is easier to use."
gem.homepage = "https://github.com/google/google-api-ruby-client"
gem.license = "Apache-2.0"
gem.metadata = {
"bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues",
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-accesscontextmanager_v1beta/CHANGELOG.md",
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-accesscontextmanager_v1beta/v#{Google::Apis::AccesscontextmanagerV1beta::GEM_VERSION}",
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-accesscontextmanager_v1beta"
}
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
gem.require_paths = ["lib"]
gem.required_ruby_version = '>= 2.4'
gem.add_runtime_dependency "google-apis-core", "~> 0.1"
end

View File

@ -0,0 +1,15 @@
# Copyright 2020 Google LLC
#
# 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"

View File

@ -0,0 +1,36 @@
# Copyright 2020 Google LLC
#
# 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'
require 'google/apis/accesscontextmanager_v1beta/gem_version.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 of the Access Context Manager API this client connects to.
# This is NOT the gem version.
VERSION = 'V1beta'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

View File

@ -0,0 +1,727 @@
# Copyright 2020 Google LLC
#
# 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 Google Cloud
# services, along with a list of requirements necessary for the label to be
# applied.
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
# `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language
# to represent the necessary conditions for the level to apply to a request. See
# CEL spec at: https://github.com/google/cel-spec
# Corresponds to the JSON property `custom`
# @return [Google::Apis::AccesscontextmanagerV1beta::CustomLevel]
attr_accessor :custom
# 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``. The maximum length //
# of the `short_name` component is 50 characters.
# 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
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@basic = args[:basic] if args.key?(:basic)
@custom = args[:custom] if args.key?(:custom)
@description = args[:description] if args.key?(:description)
@name = args[:name] if args.key?(:name)
@title = args[:title] if args.key?(:title)
end
end
# `AccessPolicy` is a container for `AccessLevels` (which define the necessary
# attributes to use Google Cloud 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. 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
# Required. Human readable title. Does not affect behavior.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
@parent = args[:parent] if args.key?(:parent)
@title = args[:title] if args.key?(:title)
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<Google::Apis::AccesscontextmanagerV1beta::Condition>]
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<String>]
attr_accessor :ip_subnetworks
# The request must be made by one of the provided user or service accounts.
# Groups are not supported. Syntax: `user:`emailid`` `serviceAccount:`emailid``
# If not specified, a request may come from any user.
# Corresponds to the JSON property `members`
# @return [Array<String>]
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
# The request must originate from one of the provided countries/regions. Must be
# valid ISO 3166-1 alpha-2 codes.
# Corresponds to the JSON property `regions`
# @return [Array<String>]
attr_accessor :regions
# 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<String>]
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)
@regions = args[:regions] if args.key?(:regions)
@required_access_levels = args[:required_access_levels] if args.key?(:required_access_levels)
end
end
# `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language
# to represent the necessary conditions for the level to apply to a request. See
# CEL spec at: https://github.com/google/cel-spec
class CustomLevel
include Google::Apis::Core::Hashable
# Represents a textual expression in the Common Expression Language (CEL) syntax.
# CEL is a C-like expression language. The syntax and semantics of CEL are
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
# "Summary size limit" description: "Determines if a summary is less than 100
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
# Requestor is owner" description: "Determines if requestor is the document
# owner" expression: "document.owner == request.auth.claims.email" Example (
# Logic): title: "Public documents" description: "Determine whether the document
# should be publicly visible" expression: "document.type != 'private' &&
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
# string" description: "Create a notification string with a timestamp."
# expression: "'New message received at ' + string(document.create_time)" The
# exact variables and functions that may be referenced within an expression are
# determined by the service that evaluates it. See the service documentation for
# additional information.
# Corresponds to the JSON property `expr`
# @return [Google::Apis::AccesscontextmanagerV1beta::Expr]
attr_accessor :expr
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@expr = args[:expr] if args.key?(:expr)
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<String>]
attr_accessor :allowed_device_management_levels
# Allowed encryptions statuses, an empty list allows all statuses.
# Corresponds to the JSON property `allowedEncryptionStatuses`
# @return [Array<String>]
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<Google::Apis::AccesscontextmanagerV1beta::OsConstraint>]
attr_accessor :os_constraints
# Whether the device needs to be approved by the customer admin.
# Corresponds to the JSON property `requireAdminApproval`
# @return [Boolean]
attr_accessor :require_admin_approval
alias_method :require_admin_approval?, :require_admin_approval
# Whether the device needs to be corp owned.
# Corresponds to the JSON property `requireCorpOwned`
# @return [Boolean]
attr_accessor :require_corp_owned
alias_method :require_corp_owned?, :require_corp_owned
# 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_admin_approval = args[:require_admin_approval] if args.key?(:require_admin_approval)
@require_corp_owned = args[:require_corp_owned] if args.key?(:require_corp_owned)
@require_screenlock = args[:require_screenlock] if args.key?(:require_screenlock)
end
end
# Represents a textual expression in the Common Expression Language (CEL) syntax.
# CEL is a C-like expression language. The syntax and semantics of CEL are
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
# "Summary size limit" description: "Determines if a summary is less than 100
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
# Requestor is owner" description: "Determines if requestor is the document
# owner" expression: "document.owner == request.auth.claims.email" Example (
# Logic): title: "Public documents" description: "Determine whether the document
# should be publicly visible" expression: "document.type != 'private' &&
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
# string" description: "Create a notification string with a timestamp."
# expression: "'New message received at ' + string(document.create_time)" The
# exact variables and functions that may be referenced within an expression are
# determined by the service that evaluates it. See the service documentation for
# additional information.
class Expr
include Google::Apis::Core::Hashable
# Optional. Description of the expression. This is a longer text which describes
# the expression, e.g. when hovered over it in a UI.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Textual representation of an expression in Common Expression Language syntax.
# Corresponds to the JSON property `expression`
# @return [String]
attr_accessor :expression
# Optional. String indicating the location of the expression for error reporting,
# e.g. a file name and a position in the file.
# Corresponds to the JSON property `location`
# @return [String]
attr_accessor :location
# Optional. Title for the expression, i.e. a short string describing its purpose.
# This can be used e.g. in UIs which allow to enter the expression.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@description = args[:description] if args.key?(:description)
@expression = args[:expression] if args.key?(:expression)
@location = args[:location] if args.key?(:location)
@title = args[:title] if args.key?(:title)
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<Google::Apis::AccesscontextmanagerV1beta::AccessLevel>]
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<Google::Apis::AccesscontextmanagerV1beta::AccessPolicy>]
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<Google::Apis::AccesscontextmanagerV1beta::ServicePerimeter>]
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). Each `Status` message contains three pieces of
# data: error code, error message, and error details. You can find out more
# about this error model and how to work with it in the [API Design Guide](https:
# //cloud.google.com/apis/design/errors).
# 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<String,Object>]
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
# be a resource name ending with `operations/`unique_id``.
# 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<String,Object>]
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
# Only allows requests from devices with a verified Chrome OS. Verifications
# includes requirements that the device is enterprise-managed, conformant to
# domain policies, and the caller has permission to call the API targeted by the
# request.
# Corresponds to the JSON property `requireVerifiedChromeOs`
# @return [Boolean]
attr_accessor :require_verified_chrome_os
alias_method :require_verified_chrome_os?, :require_verified_chrome_os
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)
@require_verified_chrome_os = args[:require_verified_chrome_os] if args.key?(:require_verified_chrome_os)
end
end
# `ServicePerimeter` describes a set of Google Cloud 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 Google
# Cloud project can only belong to a single regular Service Perimeter. Service
# Perimeter Bridges can contain only Google Cloud projects as members, a single
# Google Cloud project may belong to multiple Service Perimeter Bridges.
class ServicePerimeter
include Google::Apis::Core::Hashable
# 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 Google Cloud 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
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@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)
end
end
# `ServicePerimeterConfig` specifies a set of Google Cloud 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 Google Cloud 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<String>]
attr_accessor :access_levels
# A list of Google Cloud 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<String>]
attr_accessor :resources
# Google Cloud services that are subject to the Service Perimeter restrictions.
# Must contain a list of services. For example, if `storage.googleapis.com` is
# specified, access to the storage buckets inside the perimeter must meet the
# perimeter's access restrictions.
# Corresponds to the JSON property `restrictedServices`
# @return [Array<String>]
attr_accessor :restricted_services
# Google Cloud services that are not subject to the Service Perimeter
# restrictions. Deprecated. Must be set to a single wildcard "*". The wildcard
# means that unless explicitly specified by "restricted_services" list, any
# service is treated as unrestricted.
# Corresponds to the JSON property `unrestrictedServices`
# @return [Array<String>]
attr_accessor :unrestricted_services
# Specifies how APIs are allowed to communicate within the Service Perimeter.
# Corresponds to the JSON property `vpcAccessibleServices`
# @return [Google::Apis::AccesscontextmanagerV1beta::VpcAccessibleServices]
attr_accessor :vpc_accessible_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)
@vpc_accessible_services = args[:vpc_accessible_services] if args.key?(:vpc_accessible_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). Each `Status` message contains three pieces of
# data: error code, error message, and error details. You can find out more
# about this error model and how to work with it in the [API Design Guide](https:
# //cloud.google.com/apis/design/errors).
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<Hash<String,Object>>]
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
# Specifies how APIs are allowed to communicate within the Service Perimeter.
class VpcAccessibleServices
include Google::Apis::Core::Hashable
# The list of APIs usable within the Service Perimeter. Must be empty unless '
# enable_restriction' is True. You can specify a list of individual services, as
# well as include the 'RESTRICTED-SERVICES' value, which automatically includes
# all of the services protected by the perimeter.
# Corresponds to the JSON property `allowedServices`
# @return [Array<String>]
attr_accessor :allowed_services
# Whether to restrict API calls within the Service Perimeter to the list of APIs
# specified in 'allowed_services'.
# Corresponds to the JSON property `enableRestriction`
# @return [Boolean]
attr_accessor :enable_restriction
alias_method :enable_restriction?, :enable_restriction
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@allowed_services = args[:allowed_services] if args.key?(:allowed_services)
@enable_restriction = args[:enable_restriction] if args.key?(:enable_restriction)
end
end
end
end
end

View File

@ -0,0 +1,28 @@
# Copyright 2020 Google LLC
#
# 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.
module Google
module Apis
module AccesscontextmanagerV1beta
# Version of the google-apis-accesscontextmanager_v1beta gem
GEM_VERSION = "0.1.0"
# Version of the code generator used to generate this client
GENERATOR_VERSION = "0.1.0"
# Revision of the discovery document this client was generated from
REVISION = "20200825"
end
end
end

View File

@ -0,0 +1,286 @@
# Copyright 2020 Google LLC
#
# 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 CustomLevel
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 Expr
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 VpcAccessibleServices
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 :custom, as: 'custom', class: Google::Apis::AccesscontextmanagerV1beta::CustomLevel, decorator: Google::Apis::AccesscontextmanagerV1beta::CustomLevel::Representation
property :description, as: 'description'
property :name, as: 'name'
property :title, as: 'title'
end
end
class AccessPolicy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :parent, as: 'parent'
property :title, as: 'title'
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 :regions, as: 'regions'
collection :required_access_levels, as: 'requiredAccessLevels'
end
end
class CustomLevel
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :expr, as: 'expr', class: Google::Apis::AccesscontextmanagerV1beta::Expr, decorator: Google::Apis::AccesscontextmanagerV1beta::Expr::Representation
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_admin_approval, as: 'requireAdminApproval'
property :require_corp_owned, as: 'requireCorpOwned'
property :require_screenlock, as: 'requireScreenlock'
end
end
class Expr
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
property :expression, as: 'expression'
property :location, as: 'location'
property :title, as: 'title'
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'
property :require_verified_chrome_os, as: 'requireVerifiedChromeOs'
end
end
class ServicePerimeter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
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'
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'
property :vpc_accessible_services, as: 'vpcAccessibleServices', class: Google::Apis::AccesscontextmanagerV1beta::VpcAccessibleServices, decorator: Google::Apis::AccesscontextmanagerV1beta::VpcAccessibleServices::Representation
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
class VpcAccessibleServices
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :allowed_services, as: 'allowedServices'
property :enable_restriction, as: 'enableRestriction'
end
end
end
end
end

View File

@ -0,0 +1,638 @@
# Copyright 2020 Google LLC
#
# 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``. The maximum length //
# of the `short_name` component is 50 characters.
# @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 a 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 a 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 a 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 a 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

View File

@ -0,0 +1,27 @@
# Copyright 2020 Google LLC
#
# 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 "rspec"
RSpec.describe "Google::Apis::AccesscontextmanagerV1beta" do
# Minimal test just to ensure no syntax errors in generated code
it "should load" do
expect do
require "google/apis/accesscontextmanager_v1beta"
end.not_to raise_error
expect do
Google::Apis::AccesscontextmanagerV1beta::AccessContextManagerService.new
end.not_to raise_error
end
end

View File

@ -0,0 +1,2 @@
--color
--format documentation

View File

@ -0,0 +1,12 @@
--hide-void-return
--no-private
--verbose
--markup-provider=redcarpet
--markup=markdown
--main OVERVIEW.md
lib/google/apis/adexchangebuyer2_v2beta1/*.rb
lib/google/apis/adexchangebuyer2_v2beta1.rb
-
OVERVIEW.md
CHANGELOG.md
LICENSE.md

View File

@ -0,0 +1,7 @@
# Release history for google-apis-adexchangebuyer2_v2beta1
### v0.1.0 (2021-01-01)
* Regenerated from discovery document revision 20201202
* Regenerated using generator version 0.1.0

View File

@ -0,0 +1,23 @@
source 'https://rubygems.org'
gemspec
group :development do
gem "bundler", ">= 1.17"
gem "rake", ">= 12.0"
gem "rspec", "~> 3.9"
gem "opencensus", "~> 0.5"
end
platforms :jruby do
group :development do
gem "jruby-openssl"
end
end
platforms :ruby do
group :development do
gem "yard", "~> 0.9", ">= 0.9.25"
gem "redcarpet", "~> 3.5"
end
end

View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@ -0,0 +1,96 @@
# Legacy REST client for version V2beta1 of the Ad Exchange Buyer API II
This is a simple client library for version V2beta1 of the Ad Exchange Buyer API II. It provides:
* A client object that connects to the HTTP/JSON REST endpoint for the service.
* Ruby objects for data structures related to the service.
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
* Control of retry, pagination, and timeouts.
Note that although this client library is supported and will continue to be updated to track changes to the service, it is considered legacy. A more modern client may be available for many Google services, especially Cloud Platform services. See the section below titled *Which client should I use?* for more information.
## Getting started
### Before you begin
There are a few setup steps you need to complete before you can use this library:
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/adexchangebuyer2.googleapis.com) in the console.
### Installation
Add this line to your application's Gemfile:
```ruby
gem 'google-apis-adexchangebuyer2_v2beta1', '~> 0.1'
```
And then execute:
```
$ bundle
```
Or install it yourself as:
```
$ gem install google-apis-adexchangebuyer2_v2beta1
```
### Creating a client object
Once the gem is installed, you can load the client code and instantiate a client.
```ruby
# Load the client
require "google/apis/adexchangebuyer2_v2beta1"
# Create a client object
client = Google::Apis::Adexchangebuyer2V2beta1::AdExchangeBuyerIIService.new
# Authenticate calls
client.authentication = # ... use the googleauth gem to create credentials
```
See the class reference docs for information on the methods you can call from a client.
## Documentation
More detailed descriptions of the Google legacy REST clients are available in two documents.
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
(Note: the above documents are written for the legacy clients in general, and their examples may not reflect the Adexchangebuyer2 service in particular.)
For reference information on specific calls in the Ad Exchange Buyer API II, see the {Google::Apis::Adexchangebuyer2V2beta1::AdExchangeBuyerIIService class reference docs}.
## Which client should I use?
Google provides two types of Ruby API client libraries: **legacy REST clients** and **modern clients**.
This library, `google-apis-adexchangebuyer2_v2beta1`, is a legacy REST client. You can identify legacy clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The legacy REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
Modern clients are produced by a modern code generator, combined with hand-crafted functionality for some services. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Cloud Platform services, but do not yet support all the services covered by the legacy clients.
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
**For most users, we recommend the modern client, if one is available.** Compared with legacy clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a legacy client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
The [product documentation](https://developers.google.com/authorized-buyers/apis/reference/rest/) may provide guidance regarding the preferred client library to use.
## Supported Ruby versions
This library is supported on Ruby 2.5+.
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
## License
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
## Support
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).

View File

@ -0,0 +1,28 @@
require "bundler/gem_tasks"
task :release_gem do
Rake::Task["build"].invoke
Rake::Task["release:rubygem_push"].invoke
end
require 'rake/clean'
CLOBBER.include('coverage', 'doc')
CLEAN.include('.yardoc')
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
begin
require 'yard'
require 'yard/rake/yardoc_task'
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb', 'generated/**/*.rb']
t.options = ['--verbose', '--markup', 'markdown']
end
rescue LoadError
task :yard
puts "YARD not available"
end
task :ci => [:spec, :yard, :build]
task :default => :ci

View File

@ -0,0 +1,32 @@
require File.expand_path("lib/google/apis/adexchangebuyer2_v2beta1/gem_version", __dir__)
Gem::Specification.new do |gem|
gem.name = "google-apis-adexchangebuyer2_v2beta1"
gem.version = Google::Apis::Adexchangebuyer2V2beta1::GEM_VERSION
gem.authors = ["Google LLC"]
gem.email = "googleapis-packages@google.com"
gem.summary = "Legacy REST client for Ad Exchange Buyer API II V2beta1"
gem.description =
"This is the legacy REST client for Ad Exchange Buyer API II V2beta1." \
" Legacy REST clients are simple Ruby libraries that provide access to" \
" Google services via their HTTP REST API endpoints. These libraries are" \
" generated and updated automatically based on the discovery documents" \
" published by the service, and they handle most concerns such as" \
" authentication, pagination, retry, timeouts, and logging. You can use" \
" this client to access the Ad Exchange Buyer API II, but note that some" \
" services may provide a separate modern client that is easier to use."
gem.homepage = "https://github.com/google/google-api-ruby-client"
gem.license = "Apache-2.0"
gem.metadata = {
"bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues",
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-adexchangebuyer2_v2beta1/CHANGELOG.md",
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-adexchangebuyer2_v2beta1/v#{Google::Apis::Adexchangebuyer2V2beta1::GEM_VERSION}",
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-adexchangebuyer2_v2beta1"
}
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
gem.require_paths = ["lib"]
gem.required_ruby_version = '>= 2.4'
gem.add_runtime_dependency "google-apis-core", "~> 0.1"
end

View File

@ -0,0 +1,15 @@
# Copyright 2020 Google LLC
#
# 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/adexchangebuyer2_v2beta1"

View File

@ -0,0 +1,38 @@
# Copyright 2020 Google LLC
#
# 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/adexchangebuyer2_v2beta1/service.rb'
require 'google/apis/adexchangebuyer2_v2beta1/classes.rb'
require 'google/apis/adexchangebuyer2_v2beta1/representations.rb'
require 'google/apis/adexchangebuyer2_v2beta1/gem_version.rb'
module Google
module Apis
# Ad Exchange Buyer API II
#
# Accesses the latest features for managing Authorized Buyers accounts, Real-
# Time Bidding configurations and auction metrics, and Marketplace programmatic
# deals.
#
# @see https://developers.google.com/authorized-buyers/apis/reference/rest/
module Adexchangebuyer2V2beta1
# Version of the Ad Exchange Buyer API II this client connects to.
# This is NOT the gem version.
VERSION = 'V2beta1'
# Manage your Ad Exchange buyer account configuration
AUTH_ADEXCHANGE_BUYER = 'https://www.googleapis.com/auth/adexchange.buyer'
end
end
end

View File

@ -0,0 +1,28 @@
# Copyright 2020 Google LLC
#
# 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.
module Google
module Apis
module Adexchangebuyer2V2beta1
# Version of the google-apis-adexchangebuyer2_v2beta1 gem
GEM_VERSION = "0.1.0"
# Version of the code generator used to generate this client
GENERATOR_VERSION = "0.1.0"
# Revision of the discovery document this client was generated from
REVISION = "20201202"
end
end
end

View File

@ -0,0 +1,27 @@
# Copyright 2020 Google LLC
#
# 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 "rspec"
RSpec.describe "Google::Apis::Adexchangebuyer2V2beta1" do
# Minimal test just to ensure no syntax errors in generated code
it "should load" do
expect do
require "google/apis/adexchangebuyer2_v2beta1"
end.not_to raise_error
expect do
Google::Apis::Adexchangebuyer2V2beta1::AdExchangeBuyerIIService.new
end.not_to raise_error
end
end

View File

@ -0,0 +1,2 @@
--color
--format documentation

View File

@ -0,0 +1,12 @@
--hide-void-return
--no-private
--verbose
--markup-provider=redcarpet
--markup=markdown
--main OVERVIEW.md
lib/google/apis/adexchangebuyer_v1_2/*.rb
lib/google/apis/adexchangebuyer_v1_2.rb
-
OVERVIEW.md
CHANGELOG.md
LICENSE.md

View File

@ -0,0 +1,7 @@
# Release history for google-apis-adexchangebuyer_v1_2
### v0.1.0 (2021-01-01)
* Regenerated from discovery document revision 20180222
* Regenerated using generator version 0.1.0

View File

@ -0,0 +1,23 @@
source 'https://rubygems.org'
gemspec
group :development do
gem "bundler", ">= 1.17"
gem "rake", ">= 12.0"
gem "rspec", "~> 3.9"
gem "opencensus", "~> 0.5"
end
platforms :jruby do
group :development do
gem "jruby-openssl"
end
end
platforms :ruby do
group :development do
gem "yard", "~> 0.9", ">= 0.9.25"
gem "redcarpet", "~> 3.5"
end
end

View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@ -0,0 +1,96 @@
# Legacy REST client for version V1_2 of the Ad Exchange Buyer API
This is a simple client library for version V1_2 of the Ad Exchange Buyer API. It provides:
* A client object that connects to the HTTP/JSON REST endpoint for the service.
* Ruby objects for data structures related to the service.
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
* Control of retry, pagination, and timeouts.
Note that although this client library is supported and will continue to be updated to track changes to the service, it is considered legacy. A more modern client may be available for many Google services, especially Cloud Platform services. See the section below titled *Which client should I use?* for more information.
## Getting started
### Before you begin
There are a few setup steps you need to complete before you can use this library:
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/adexchangebuyer.googleapis.com) in the console.
### Installation
Add this line to your application's Gemfile:
```ruby
gem 'google-apis-adexchangebuyer_v1_2', '~> 0.1'
```
And then execute:
```
$ bundle
```
Or install it yourself as:
```
$ gem install google-apis-adexchangebuyer_v1_2
```
### Creating a client object
Once the gem is installed, you can load the client code and instantiate a client.
```ruby
# Load the client
require "google/apis/adexchangebuyer_v1_2"
# Create a client object
client = Google::Apis::AdexchangebuyerV1_2::AdExchangeBuyerService.new
# Authenticate calls
client.authentication = # ... use the googleauth gem to create credentials
```
See the class reference docs for information on the methods you can call from a client.
## Documentation
More detailed descriptions of the Google legacy REST clients are available in two documents.
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
(Note: the above documents are written for the legacy clients in general, and their examples may not reflect the Adexchangebuyer service in particular.)
For reference information on specific calls in the Ad Exchange Buyer API, see the {Google::Apis::AdexchangebuyerV1_2::AdExchangeBuyerService class reference docs}.
## Which client should I use?
Google provides two types of Ruby API client libraries: **legacy REST clients** and **modern clients**.
This library, `google-apis-adexchangebuyer_v1_2`, is a legacy REST client. You can identify legacy clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The legacy REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
Modern clients are produced by a modern code generator, combined with hand-crafted functionality for some services. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Cloud Platform services, but do not yet support all the services covered by the legacy clients.
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
**For most users, we recommend the modern client, if one is available.** Compared with legacy clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a legacy client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
The [product documentation](https://developers.google.com/ad-exchange/buyer-rest) may provide guidance regarding the preferred client library to use.
## Supported Ruby versions
This library is supported on Ruby 2.5+.
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
## License
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
## Support
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).

View File

@ -0,0 +1,28 @@
require "bundler/gem_tasks"
task :release_gem do
Rake::Task["build"].invoke
Rake::Task["release:rubygem_push"].invoke
end
require 'rake/clean'
CLOBBER.include('coverage', 'doc')
CLEAN.include('.yardoc')
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
begin
require 'yard'
require 'yard/rake/yardoc_task'
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb', 'generated/**/*.rb']
t.options = ['--verbose', '--markup', 'markdown']
end
rescue LoadError
task :yard
puts "YARD not available"
end
task :ci => [:spec, :yard, :build]
task :default => :ci

View File

@ -0,0 +1,32 @@
require File.expand_path("lib/google/apis/adexchangebuyer_v1_2/gem_version", __dir__)
Gem::Specification.new do |gem|
gem.name = "google-apis-adexchangebuyer_v1_2"
gem.version = Google::Apis::AdexchangebuyerV1_2::GEM_VERSION
gem.authors = ["Google LLC"]
gem.email = "googleapis-packages@google.com"
gem.summary = "Legacy REST client for Ad Exchange Buyer API V1_2"
gem.description =
"This is the legacy REST client for Ad Exchange Buyer API V1_2." \
" Legacy REST clients are simple Ruby libraries that provide access to" \
" Google services via their HTTP REST API endpoints. These libraries are" \
" generated and updated automatically based on the discovery documents" \
" published by the service, and they handle most concerns such as" \
" authentication, pagination, retry, timeouts, and logging. You can use" \
" this client to access the Ad Exchange Buyer API, but note that some" \
" services may provide a separate modern client that is easier to use."
gem.homepage = "https://github.com/google/google-api-ruby-client"
gem.license = "Apache-2.0"
gem.metadata = {
"bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues",
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-adexchangebuyer_v1_2/CHANGELOG.md",
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-adexchangebuyer_v1_2/v#{Google::Apis::AdexchangebuyerV1_2::GEM_VERSION}",
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-adexchangebuyer_v1_2"
}
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
gem.require_paths = ["lib"]
gem.required_ruby_version = '>= 2.4'
gem.add_runtime_dependency "google-apis-core", "~> 0.1"
end

View File

@ -0,0 +1,15 @@
# Copyright 2020 Google LLC
#
# 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/adexchangebuyer_v1_2"

Some files were not shown because too many files have changed in this diff Show More