From 76d627cac5a3826d6ffa29285303c458cd42094a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 26 Jul 2026 11:28:02 +0000 Subject: [PATCH] feat: Automated regeneration of agentidentity v1 client --- api_names_out.yaml | 215 +++ .../.repo-metadata.json | 7 + generated/google-apis-agentidentity_v1/.rspec | 2 + .../google-apis-agentidentity_v1/.toys.rb | 57 + .../google-apis-agentidentity_v1/.yardopts | 13 + .../google-apis-agentidentity_v1/CHANGELOG.md | 7 + .../google-apis-agentidentity_v1/Gemfile | 23 + .../google-apis-agentidentity_v1/LICENSE.md | 202 +++ .../google-apis-agentidentity_v1/OVERVIEW.md | 96 ++ .../google-apis-agentidentity_v1/Rakefile | 28 + .../google-apis-agentidentity_v1.gemspec | 33 + .../lib/google-apis-agentidentity_v1.rb | 15 + .../lib/google/apis/agentidentity_v1.rb | 36 + .../google/apis/agentidentity_v1/classes.rb | 1170 +++++++++++++++++ .../apis/agentidentity_v1/gem_version.rb | 28 + .../apis/agentidentity_v1/representations.rb | 475 +++++++ .../google/apis/agentidentity_v1/service.rb | 927 +++++++++++++ .../spec/generated_spec.rb | 27 + 18 files changed, 3361 insertions(+) create mode 100644 generated/google-apis-agentidentity_v1/.repo-metadata.json create mode 100644 generated/google-apis-agentidentity_v1/.rspec create mode 100644 generated/google-apis-agentidentity_v1/.toys.rb create mode 100644 generated/google-apis-agentidentity_v1/.yardopts create mode 100644 generated/google-apis-agentidentity_v1/CHANGELOG.md create mode 100644 generated/google-apis-agentidentity_v1/Gemfile create mode 100644 generated/google-apis-agentidentity_v1/LICENSE.md create mode 100644 generated/google-apis-agentidentity_v1/OVERVIEW.md create mode 100644 generated/google-apis-agentidentity_v1/Rakefile create mode 100644 generated/google-apis-agentidentity_v1/google-apis-agentidentity_v1.gemspec create mode 100644 generated/google-apis-agentidentity_v1/lib/google-apis-agentidentity_v1.rb create mode 100644 generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1.rb create mode 100644 generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1/classes.rb create mode 100644 generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1/gem_version.rb create mode 100644 generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1/representations.rb create mode 100644 generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1/service.rb create mode 100644 generated/google-apis-agentidentity_v1/spec/generated_spec.rb diff --git a/api_names_out.yaml b/api_names_out.yaml index aca054826b3..2abd1b294e2 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -6819,6 +6819,221 @@ "/advisorynotifications:v1/fields": fields "/advisorynotifications:v1/key": key "/advisorynotifications:v1/quotaUser": quota_user +"/agentidentity:v1/AccessSummary": access_summary +"/agentidentity:v1/AccessSummary/authProvider": auth_provider +"/agentidentity:v1/AccessSummary/authProviderType": auth_provider_type +"/agentidentity:v1/AccessSummary/firstAccessTime": first_access_time +"/agentidentity:v1/AccessSummary/labels": labels +"/agentidentity:v1/AccessSummary/labels/label": label +"/agentidentity:v1/AccessSummary/lastAccessTime": last_access_time +"/agentidentity:v1/AccessSummary/name": name +"/agentidentity:v1/AccessSummary/purgeTime": purge_time +"/agentidentity:v1/AccessSummary/scopes": scopes +"/agentidentity:v1/AccessSummary/scopes/scope": scope +"/agentidentity:v1/AccessSummary/tokenUrl": token_url +"/agentidentity:v1/AccessSummary/userId": user_id +"/agentidentity:v1/AccessSummary/workloadId": workload_id +"/agentidentity:v1/ApiKeyParams": api_key_params +"/agentidentity:v1/ApiKeyParams/apiKey": api_key +"/agentidentity:v1/AuditConfig": audit_config +"/agentidentity:v1/AuditConfig/auditLogConfigs": audit_log_configs +"/agentidentity:v1/AuditConfig/auditLogConfigs/audit_log_config": audit_log_config +"/agentidentity:v1/AuditConfig/service": service +"/agentidentity:v1/AuditLogConfig": audit_log_config +"/agentidentity:v1/AuditLogConfig/exemptedMembers": exempted_members +"/agentidentity:v1/AuditLogConfig/exemptedMembers/exempted_member": exempted_member +"/agentidentity:v1/AuditLogConfig/logType": log_type +"/agentidentity:v1/AuthProvider": auth_provider +"/agentidentity:v1/AuthProvider/allowedScopes": allowed_scopes +"/agentidentity:v1/AuthProvider/allowedScopes/allowed_scope": allowed_scope +"/agentidentity:v1/AuthProvider/authProviderTypeParams": auth_provider_type_params +"/agentidentity:v1/AuthProvider/blockedScopes": blocked_scopes +"/agentidentity:v1/AuthProvider/blockedScopes/blocked_scope": blocked_scope +"/agentidentity:v1/AuthProvider/createTime": create_time +"/agentidentity:v1/AuthProvider/deleted": deleted +"/agentidentity:v1/AuthProvider/description": description +"/agentidentity:v1/AuthProvider/expireTime": expire_time +"/agentidentity:v1/AuthProvider/labels": labels +"/agentidentity:v1/AuthProvider/labels/label": label +"/agentidentity:v1/AuthProvider/name": name +"/agentidentity:v1/AuthProvider/state": state +"/agentidentity:v1/AuthProvider/updateTime": update_time +"/agentidentity:v1/AuthProvider/workloadIds": workload_ids +"/agentidentity:v1/AuthProvider/workloadIds/workload_id": workload_id +"/agentidentity:v1/AuthProviderTypeParams": auth_provider_type_params +"/agentidentity:v1/AuthProviderTypeParams/apiKey": api_key +"/agentidentity:v1/AuthProviderTypeParams/geAuthProvider": ge_auth_provider +"/agentidentity:v1/AuthProviderTypeParams/threeLeggedOauth": three_legged_oauth +"/agentidentity:v1/AuthProviderTypeParams/twoLeggedOauth": two_legged_oauth +"/agentidentity:v1/Authorization": authorization +"/agentidentity:v1/Authorization/clientUserId": client_user_id +"/agentidentity:v1/Authorization/createTime": create_time +"/agentidentity:v1/Authorization/name": name +"/agentidentity:v1/Authorization/scopes": scopes +"/agentidentity:v1/Authorization/scopes/scope": scope +"/agentidentity:v1/Authorization/state": state +"/agentidentity:v1/Authorization/updateTime": update_time +"/agentidentity:v1/Binding": binding +"/agentidentity:v1/Binding/condition": condition +"/agentidentity:v1/Binding/members": members +"/agentidentity:v1/Binding/members/member": member +"/agentidentity:v1/Binding/role": role +"/agentidentity:v1/DisableAuthProviderRequest": disable_auth_provider_request +"/agentidentity:v1/DisableAuthProviderRequest/requestId": request_id +"/agentidentity:v1/Empty": empty +"/agentidentity:v1/EnableAuthProviderRequest": enable_auth_provider_request +"/agentidentity:v1/EnableAuthProviderRequest/requestId": request_id +"/agentidentity:v1/Expr": expr +"/agentidentity:v1/Expr/description": description +"/agentidentity:v1/Expr/expression": expression +"/agentidentity:v1/Expr/location": location +"/agentidentity:v1/Expr/title": title +"/agentidentity:v1/GeminiEnterpriseAuthProviderParams": gemini_enterprise_auth_provider_params +"/agentidentity:v1/ListAccessSummariesResponse": list_access_summaries_response +"/agentidentity:v1/ListAccessSummariesResponse/accessSummaries": access_summaries +"/agentidentity:v1/ListAccessSummariesResponse/accessSummaries/access_summary": access_summary +"/agentidentity:v1/ListAccessSummariesResponse/nextPageToken": next_page_token +"/agentidentity:v1/ListAccessSummariesResponse/unreachable": unreachable +"/agentidentity:v1/ListAccessSummariesResponse/unreachable/unreachable": unreachable +"/agentidentity:v1/ListAuthProvidersResponse": list_auth_providers_response +"/agentidentity:v1/ListAuthProvidersResponse/authProviders": auth_providers +"/agentidentity:v1/ListAuthProvidersResponse/authProviders/auth_provider": auth_provider +"/agentidentity:v1/ListAuthProvidersResponse/nextPageToken": next_page_token +"/agentidentity:v1/ListAuthProvidersResponse/unreachable": unreachable +"/agentidentity:v1/ListAuthProvidersResponse/unreachable/unreachable": unreachable +"/agentidentity:v1/ListAuthorizationsResponse": list_authorizations_response +"/agentidentity:v1/ListAuthorizationsResponse/authorizations": authorizations +"/agentidentity:v1/ListAuthorizationsResponse/authorizations/authorization": authorization +"/agentidentity:v1/ListAuthorizationsResponse/nextPageToken": next_page_token +"/agentidentity:v1/ListAuthorizationsResponse/unreachable": unreachable +"/agentidentity:v1/ListAuthorizationsResponse/unreachable/unreachable": unreachable +"/agentidentity:v1/ListLocationsResponse": list_locations_response +"/agentidentity:v1/ListLocationsResponse/locations": locations +"/agentidentity:v1/ListLocationsResponse/locations/location": location +"/agentidentity:v1/ListLocationsResponse/nextPageToken": next_page_token +"/agentidentity:v1/Location": location +"/agentidentity:v1/Location/displayName": display_name +"/agentidentity:v1/Location/labels": labels +"/agentidentity:v1/Location/labels/label": label +"/agentidentity:v1/Location/locationId": location_id +"/agentidentity:v1/Location/metadata": metadata +"/agentidentity:v1/Location/metadata/metadatum": metadatum +"/agentidentity:v1/Location/name": name +"/agentidentity:v1/Policy": policy +"/agentidentity:v1/Policy/auditConfigs": audit_configs +"/agentidentity:v1/Policy/auditConfigs/audit_config": audit_config +"/agentidentity:v1/Policy/bindings": bindings +"/agentidentity:v1/Policy/bindings/binding": binding +"/agentidentity:v1/Policy/etag": etag +"/agentidentity:v1/Policy/version": version +"/agentidentity:v1/QueryAuthProvidersResponse": query_auth_providers_response +"/agentidentity:v1/QueryAuthProvidersResponse/authProviderNames": auth_provider_names +"/agentidentity:v1/QueryAuthProvidersResponse/authProviderNames/auth_provider_name": auth_provider_name +"/agentidentity:v1/QueryAuthProvidersResponse/nextPageToken": next_page_token +"/agentidentity:v1/QueryWorkloadsResponse": query_workloads_response +"/agentidentity:v1/QueryWorkloadsResponse/nextPageToken": next_page_token +"/agentidentity:v1/QueryWorkloadsResponse/workloadIds": workload_ids +"/agentidentity:v1/QueryWorkloadsResponse/workloadIds/workload_id": workload_id +"/agentidentity:v1/RevokeAuthorizationRequest": revoke_authorization_request +"/agentidentity:v1/RevokeAuthorizationRequest/userId": user_id +"/agentidentity:v1/RevokeAuthorizationResponse": revoke_authorization_response +"/agentidentity:v1/SetIamPolicyRequest": set_iam_policy_request +"/agentidentity:v1/SetIamPolicyRequest/policy": policy +"/agentidentity:v1/SetIamPolicyRequest/updateMask": update_mask +"/agentidentity:v1/TestIamPermissionsRequest": test_iam_permissions_request +"/agentidentity:v1/TestIamPermissionsRequest/permissions": permissions +"/agentidentity:v1/TestIamPermissionsRequest/permissions/permission": permission +"/agentidentity:v1/TestIamPermissionsResponse": test_iam_permissions_response +"/agentidentity:v1/TestIamPermissionsResponse/permissions": permissions +"/agentidentity:v1/TestIamPermissionsResponse/permissions/permission": permission +"/agentidentity:v1/ThreeLeggedOAuth": three_legged_o_auth +"/agentidentity:v1/ThreeLeggedOAuth/authorizationUrl": authorization_url +"/agentidentity:v1/ThreeLeggedOAuth/clientId": client_id +"/agentidentity:v1/ThreeLeggedOAuth/clientSecret": client_secret +"/agentidentity:v1/ThreeLeggedOAuth/defaultContinueUri": default_continue_uri +"/agentidentity:v1/ThreeLeggedOAuth/enablePkce": enable_pkce +"/agentidentity:v1/ThreeLeggedOAuth/redirectUrl": redirect_url +"/agentidentity:v1/ThreeLeggedOAuth/tokenUrl": token_url +"/agentidentity:v1/TwoLeggedOAuth": two_legged_o_auth +"/agentidentity:v1/TwoLeggedOAuth/clientId": client_id +"/agentidentity:v1/TwoLeggedOAuth/clientSecret": client_secret +"/agentidentity:v1/TwoLeggedOAuth/tokenUrl": token_url +"/agentidentity:v1/UndeleteAuthProviderRequest": undelete_auth_provider_request +"/agentidentity:v1/UndeleteAuthProviderRequest/requestId": request_id +"/agentidentity:v1/agentidentity.projects.locations.accessSummaries.get": get_project_location_access_summary +"/agentidentity:v1/agentidentity.projects.locations.accessSummaries.get/name": name +"/agentidentity:v1/agentidentity.projects.locations.accessSummaries.list": list_project_location_access_summaries +"/agentidentity:v1/agentidentity.projects.locations.accessSummaries.list/filter": filter +"/agentidentity:v1/agentidentity.projects.locations.accessSummaries.list/orderBy": order_by +"/agentidentity:v1/agentidentity.projects.locations.accessSummaries.list/pageSize": page_size +"/agentidentity:v1/agentidentity.projects.locations.accessSummaries.list/pageToken": page_token +"/agentidentity:v1/agentidentity.projects.locations.accessSummaries.list/parent": parent +"/agentidentity:v1/agentidentity.projects.locations.authProviders.authorizations.delete": delete_project_location_auth_provider_authorization +"/agentidentity:v1/agentidentity.projects.locations.authProviders.authorizations.delete/name": name +"/agentidentity:v1/agentidentity.projects.locations.authProviders.authorizations.delete/requestId": request_id +"/agentidentity:v1/agentidentity.projects.locations.authProviders.authorizations.get": get_project_location_auth_provider_authorization +"/agentidentity:v1/agentidentity.projects.locations.authProviders.authorizations.get/name": name +"/agentidentity:v1/agentidentity.projects.locations.authProviders.authorizations.list": list_project_location_auth_provider_authorizations +"/agentidentity:v1/agentidentity.projects.locations.authProviders.authorizations.list/filter": filter +"/agentidentity:v1/agentidentity.projects.locations.authProviders.authorizations.list/orderBy": order_by +"/agentidentity:v1/agentidentity.projects.locations.authProviders.authorizations.list/pageSize": page_size +"/agentidentity:v1/agentidentity.projects.locations.authProviders.authorizations.list/pageToken": page_token +"/agentidentity:v1/agentidentity.projects.locations.authProviders.authorizations.list/parent": parent +"/agentidentity:v1/agentidentity.projects.locations.authProviders.create": create_project_location_auth_provider +"/agentidentity:v1/agentidentity.projects.locations.authProviders.create/authProviderId": auth_provider_id +"/agentidentity:v1/agentidentity.projects.locations.authProviders.create/parent": parent +"/agentidentity:v1/agentidentity.projects.locations.authProviders.create/requestId": request_id +"/agentidentity:v1/agentidentity.projects.locations.authProviders.delete": delete_project_location_auth_provider +"/agentidentity:v1/agentidentity.projects.locations.authProviders.delete/name": name +"/agentidentity:v1/agentidentity.projects.locations.authProviders.delete/requestId": request_id +"/agentidentity:v1/agentidentity.projects.locations.authProviders.disable": disable_auth_provider +"/agentidentity:v1/agentidentity.projects.locations.authProviders.disable/name": name +"/agentidentity:v1/agentidentity.projects.locations.authProviders.enable": enable_auth_provider +"/agentidentity:v1/agentidentity.projects.locations.authProviders.enable/name": name +"/agentidentity:v1/agentidentity.projects.locations.authProviders.get": get_project_location_auth_provider +"/agentidentity:v1/agentidentity.projects.locations.authProviders.get/name": name +"/agentidentity:v1/agentidentity.projects.locations.authProviders.getIamPolicy": get_project_location_auth_provider_iam_policy +"/agentidentity:v1/agentidentity.projects.locations.authProviders.getIamPolicy/options.requestedPolicyVersion": options_requested_policy_version +"/agentidentity:v1/agentidentity.projects.locations.authProviders.getIamPolicy/resource": resource +"/agentidentity:v1/agentidentity.projects.locations.authProviders.list": list_project_location_auth_providers +"/agentidentity:v1/agentidentity.projects.locations.authProviders.list/filter": filter +"/agentidentity:v1/agentidentity.projects.locations.authProviders.list/orderBy": order_by +"/agentidentity:v1/agentidentity.projects.locations.authProviders.list/pageSize": page_size +"/agentidentity:v1/agentidentity.projects.locations.authProviders.list/pageToken": page_token +"/agentidentity:v1/agentidentity.projects.locations.authProviders.list/parent": parent +"/agentidentity:v1/agentidentity.projects.locations.authProviders.list/showDeleted": show_deleted +"/agentidentity:v1/agentidentity.projects.locations.authProviders.patch": patch_project_location_auth_provider +"/agentidentity:v1/agentidentity.projects.locations.authProviders.patch/name": name +"/agentidentity:v1/agentidentity.projects.locations.authProviders.patch/requestId": request_id +"/agentidentity:v1/agentidentity.projects.locations.authProviders.patch/updateMask": update_mask +"/agentidentity:v1/agentidentity.projects.locations.authProviders.query": query_project_location_auth_provider +"/agentidentity:v1/agentidentity.projects.locations.authProviders.query/pageSize": page_size +"/agentidentity:v1/agentidentity.projects.locations.authProviders.query/pageToken": page_token +"/agentidentity:v1/agentidentity.projects.locations.authProviders.query/parent": parent +"/agentidentity:v1/agentidentity.projects.locations.authProviders.query/workloadId": workload_id +"/agentidentity:v1/agentidentity.projects.locations.authProviders.queryWorkloads": query_project_location_auth_provider_workloads +"/agentidentity:v1/agentidentity.projects.locations.authProviders.queryWorkloads/name": name +"/agentidentity:v1/agentidentity.projects.locations.authProviders.queryWorkloads/pageSize": page_size +"/agentidentity:v1/agentidentity.projects.locations.authProviders.queryWorkloads/pageToken": page_token +"/agentidentity:v1/agentidentity.projects.locations.authProviders.revokeAuthorization": revoke_auth_provider_authorization +"/agentidentity:v1/agentidentity.projects.locations.authProviders.revokeAuthorization/name": name +"/agentidentity:v1/agentidentity.projects.locations.authProviders.setIamPolicy": set_auth_provider_iam_policy +"/agentidentity:v1/agentidentity.projects.locations.authProviders.setIamPolicy/resource": resource +"/agentidentity:v1/agentidentity.projects.locations.authProviders.testIamPermissions": test_auth_provider_iam_permissions +"/agentidentity:v1/agentidentity.projects.locations.authProviders.testIamPermissions/resource": resource +"/agentidentity:v1/agentidentity.projects.locations.authProviders.undelete": undelete_auth_provider +"/agentidentity:v1/agentidentity.projects.locations.authProviders.undelete/name": name +"/agentidentity:v1/agentidentity.projects.locations.get": get_project_location +"/agentidentity:v1/agentidentity.projects.locations.get/name": name +"/agentidentity:v1/agentidentity.projects.locations.list": list_project_locations +"/agentidentity:v1/agentidentity.projects.locations.list/extraLocationTypes": extra_location_types +"/agentidentity:v1/agentidentity.projects.locations.list/filter": filter +"/agentidentity:v1/agentidentity.projects.locations.list/name": name +"/agentidentity:v1/agentidentity.projects.locations.list/pageSize": page_size +"/agentidentity:v1/agentidentity.projects.locations.list/pageToken": page_token +"/agentidentity:v1/fields": fields +"/agentidentity:v1/key": key +"/agentidentity:v1/quotaUser": quota_user "/agentregistry:v1/A2ASkill": a2_a_skill "/agentregistry:v1/A2ASkill/description": description "/agentregistry:v1/A2ASkill/examples": examples diff --git a/generated/google-apis-agentidentity_v1/.repo-metadata.json b/generated/google-apis-agentidentity_v1/.repo-metadata.json new file mode 100644 index 00000000000..29fadc26af8 --- /dev/null +++ b/generated/google-apis-agentidentity_v1/.repo-metadata.json @@ -0,0 +1,7 @@ +{ + "api_id": "agentidentity:v1", + "name_pretty": "Agent Identity API", + "distribution_name": "google-apis-agentidentity_v1", + "language": "ruby", + "library_type": "REST" +} diff --git a/generated/google-apis-agentidentity_v1/.rspec b/generated/google-apis-agentidentity_v1/.rspec new file mode 100644 index 00000000000..16f9cdb0135 --- /dev/null +++ b/generated/google-apis-agentidentity_v1/.rspec @@ -0,0 +1,2 @@ +--color +--format documentation diff --git a/generated/google-apis-agentidentity_v1/.toys.rb b/generated/google-apis-agentidentity_v1/.toys.rb new file mode 100644 index 00000000000..5754f95708a --- /dev/null +++ b/generated/google-apis-agentidentity_v1/.toys.rb @@ -0,0 +1,57 @@ +expand :clean, paths: :gitignore + +expand :rspec do |t| + t.libs = ["lib", "spec"] + t.use_bundler +end + +expand :yardoc do |t| + t.generate_output_flag = true + t.use_bundler +end + +expand :gem_build + +tool "bundle" do + flag :update + + include :exec, e: true + + def run + exec ["bundle", update ? "update" : "install"] + end +end + +tool "ci" do + include :terminal + include :exec + + def run + Dir.chdir context_directory + @gem_name = File.basename context_directory + @failures = [] + step "bundle" + step "spec" + step "yardoc" + step "build" + if @failures.empty? + puts "CI SUCEEDED", :green, :bold + else + puts "CI FAILED", :red, :bold + @failures.each { |name| puts " failed: #{name}", :red, :bold } + exit 1 + end + end + + def step tool + full_name = "#{@gem_name}:#{tool}" + puts "Starting: #{full_name}...", :cyan, :bold + result = exec_separate_tool [tool] + if result.success? + puts "SUCCESS: #{full_name}", :green, :bold + else + @failures << full_name + puts "FAILED: #{full_name}", :red, :bold + end + end +end diff --git a/generated/google-apis-agentidentity_v1/.yardopts b/generated/google-apis-agentidentity_v1/.yardopts new file mode 100644 index 00000000000..6ea977f4301 --- /dev/null +++ b/generated/google-apis-agentidentity_v1/.yardopts @@ -0,0 +1,13 @@ +--hide-void-return +--no-private +--verbose +--title=google-apis-agentidentity_v1 +--markup-provider=redcarpet +--markup=markdown +--main OVERVIEW.md +lib/google/apis/agentidentity_v1/*.rb +lib/google/apis/agentidentity_v1.rb +- +OVERVIEW.md +CHANGELOG.md +LICENSE.md diff --git a/generated/google-apis-agentidentity_v1/CHANGELOG.md b/generated/google-apis-agentidentity_v1/CHANGELOG.md new file mode 100644 index 00000000000..7fe00ee00d4 --- /dev/null +++ b/generated/google-apis-agentidentity_v1/CHANGELOG.md @@ -0,0 +1,7 @@ +# Release history for google-apis-agentidentity_v1 + +### v0.1.0 (2026-07-26) + +* Regenerated from discovery document revision 20260722 +* Regenerated using generator version 0.19.0 + diff --git a/generated/google-apis-agentidentity_v1/Gemfile b/generated/google-apis-agentidentity_v1/Gemfile new file mode 100644 index 00000000000..6fa8bb627a6 --- /dev/null +++ b/generated/google-apis-agentidentity_v1/Gemfile @@ -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 diff --git a/generated/google-apis-agentidentity_v1/LICENSE.md b/generated/google-apis-agentidentity_v1/LICENSE.md new file mode 100644 index 00000000000..32916804156 --- /dev/null +++ b/generated/google-apis-agentidentity_v1/LICENSE.md @@ -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. diff --git a/generated/google-apis-agentidentity_v1/OVERVIEW.md b/generated/google-apis-agentidentity_v1/OVERVIEW.md new file mode 100644 index 00000000000..87eda41f1f5 --- /dev/null +++ b/generated/google-apis-agentidentity_v1/OVERVIEW.md @@ -0,0 +1,96 @@ +# Simple REST client for version V1 of the Agent Identity API + +This is a simple client library for version V1 of the Agent Identity 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 otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. 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/agentidentity.googleapis.com) in the console. + +### Installation + +Add this line to your application's Gemfile: + +```ruby +gem 'google-apis-agentidentity_v1', '~> 0.1' +``` + +And then execute: + +``` +$ bundle +``` + +Or install it yourself as: + +``` +$ gem install google-apis-agentidentity_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/agentidentity_v1" + +# Create a client object +client = Google::Apis::AgentidentityV1::AgentIdentityService.new + +# Authenticate calls +client.authorization = # ... 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 simple REST clients are available in two documents. + + * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/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/main/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 simple REST clients in general, and their examples may not reflect the Agentidentity service in particular.) + +For reference information on specific calls in the Agent Identity API, see the {Google::Apis::AgentidentityV1::AgentIdentityService class reference docs}. + +## Which client should I use? + +Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**. + +This library, `google-apis-agentidentity_v1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-_`. The simple 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, sometimes combined with hand-crafted functionality. 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 Google Cloud Platform services, but do not yet support all the services covered by the simple clients. + +Gem names for modern clients are often of the form `google-cloud-`. (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--`. (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 simple 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 simple 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/iam/docs/) may provide guidance regarding the preferred client library to use. + +## Supported Ruby versions + +This library is supported on Ruby 3.2+. + +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. 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). diff --git a/generated/google-apis-agentidentity_v1/Rakefile b/generated/google-apis-agentidentity_v1/Rakefile new file mode 100644 index 00000000000..defbde59776 --- /dev/null +++ b/generated/google-apis-agentidentity_v1/Rakefile @@ -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 diff --git a/generated/google-apis-agentidentity_v1/google-apis-agentidentity_v1.gemspec b/generated/google-apis-agentidentity_v1/google-apis-agentidentity_v1.gemspec new file mode 100644 index 00000000000..b7f02a55b38 --- /dev/null +++ b/generated/google-apis-agentidentity_v1/google-apis-agentidentity_v1.gemspec @@ -0,0 +1,33 @@ +require File.expand_path("lib/google/apis/agentidentity_v1/gem_version", __dir__) +gem_version = Google::Apis::AgentidentityV1::GEM_VERSION + +Gem::Specification.new do |gem| + gem.name = "google-apis-agentidentity_v1" + gem.version = gem_version + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.summary = "Simple REST client for Agent Identity API V1" + gem.description = + "This is the simple REST client for Agent Identity API V1." \ + " Simple REST clients are Ruby client 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 Agent Identity 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/main/generated/google-apis-agentidentity_v1/CHANGELOG.md", + "documentation_uri" => "https://googleapis.dev/ruby/google-apis-agentidentity_v1/v#{gem_version}", + "source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-agentidentity_v1" + } + + gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = '>= 3.2' + gem.add_runtime_dependency "google-apis-core", ">= 0.15.0", "< 2.a" +end diff --git a/generated/google-apis-agentidentity_v1/lib/google-apis-agentidentity_v1.rb b/generated/google-apis-agentidentity_v1/lib/google-apis-agentidentity_v1.rb new file mode 100644 index 00000000000..1e74d63ab3e --- /dev/null +++ b/generated/google-apis-agentidentity_v1/lib/google-apis-agentidentity_v1.rb @@ -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/agentidentity_v1" diff --git a/generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1.rb b/generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1.rb new file mode 100644 index 00000000000..2f963f0e3d4 --- /dev/null +++ b/generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1.rb @@ -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/agentidentity_v1/service.rb' +require 'google/apis/agentidentity_v1/classes.rb' +require 'google/apis/agentidentity_v1/representations.rb' +require 'google/apis/agentidentity_v1/gem_version.rb' + +module Google + module Apis + # Agent Identity API + # + # + # + # @see https://cloud.google.com/iam/docs/ + module AgentidentityV1 + # Version of the Agent Identity API this client connects to. + # This is NOT the gem version. + VERSION = 'V1' + + # See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + end + end +end diff --git a/generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1/classes.rb b/generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1/classes.rb new file mode 100644 index 00000000000..25e211415d6 --- /dev/null +++ b/generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1/classes.rb @@ -0,0 +1,1170 @@ +# 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 AgentidentityV1 + + # Message describing AccessSummary object + class AccessSummary + include Google::Apis::Core::Hashable + + # Output only. The auth_provider that this access summary is associated with. + # Corresponds to the JSON property `authProvider` + # @return [String] + attr_accessor :auth_provider + + # Output only. The type of the connector that was used to create this access + # summary. + # Corresponds to the JSON property `authProviderType` + # @return [String] + attr_accessor :auth_provider_type + + # Output only. The first time this user has interacted with this workload. + # Rounded to the previous hour. + # Corresponds to the JSON property `firstAccessTime` + # @return [String] + attr_accessor :first_access_time + + # Optional. Labels as key value pairs + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Output only. The most recent time this user has interacted with this workload. + # Rounded to the previous hour. + # Corresponds to the JSON property `lastAccessTime` + # @return [String] + attr_accessor :last_access_time + + # Output only. Identifier. Name of the AccessSummary + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Output only. The time when this access summary is permanently deleted. + # Corresponds to the JSON property `purgeTime` + # @return [String] + attr_accessor :purge_time + + # Output only. All scopes that have been used by this user with this workload. + # The number of scopes is limited to 200. + # Corresponds to the JSON property `scopes` + # @return [Array] + attr_accessor :scopes + + # Output only. The url of the authentication server that was accessed. + # Corresponds to the JSON property `tokenUrl` + # @return [String] + attr_accessor :token_url + + # Output only. The user_id provided by the workload application for this user. + # Not verified by Google. + # Corresponds to the JSON property `userId` + # @return [String] + attr_accessor :user_id + + # Output only. The identity bound to the workload that this user interacted with + # to produce this AccessSummary. Will typically be an agentic spiffe id + # Corresponds to the JSON property `workloadId` + # @return [String] + attr_accessor :workload_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @auth_provider = args[:auth_provider] if args.key?(:auth_provider) + @auth_provider_type = args[:auth_provider_type] if args.key?(:auth_provider_type) + @first_access_time = args[:first_access_time] if args.key?(:first_access_time) + @labels = args[:labels] if args.key?(:labels) + @last_access_time = args[:last_access_time] if args.key?(:last_access_time) + @name = args[:name] if args.key?(:name) + @purge_time = args[:purge_time] if args.key?(:purge_time) + @scopes = args[:scopes] if args.key?(:scopes) + @token_url = args[:token_url] if args.key?(:token_url) + @user_id = args[:user_id] if args.key?(:user_id) + @workload_id = args[:workload_id] if args.key?(:workload_id) + end + end + + # Message describing ApiKeyParams object. + class ApiKeyParams + include Google::Apis::Core::Hashable + + # Optional. Input only. The API key for this auth_provider. + # Corresponds to the JSON property `apiKey` + # @return [String] + attr_accessor :api_key + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @api_key = args[:api_key] if args.key?(:api_key) + end + end + + # Specifies the audit configuration for a service. The configuration determines + # which permission types are logged, and what identities, if any, are exempted + # from logging. An AuditConfig must have one or more AuditLogConfigs. If there + # are AuditConfigs for both `allServices` and a specific service, the union of + # the two AuditConfigs is used for that service: the log_types specified in each + # AuditConfig are enabled, and the exempted_members in each AuditLogConfig are + # exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` " + # service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", " + # exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `, + # ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE" + # , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice, + # this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also + # exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` + # from DATA_WRITE logging. + class AuditConfig + include Google::Apis::Core::Hashable + + # The configuration for logging of each type of permission. + # Corresponds to the JSON property `auditLogConfigs` + # @return [Array] + attr_accessor :audit_log_configs + + # Specifies a service that will be enabled for audit logging. For example, ` + # storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special + # value that covers all services. + # Corresponds to the JSON property `service` + # @return [String] + attr_accessor :service + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs) + @service = args[:service] if args.key?(:service) + end + end + + # Provides the configuration for logging a type of permissions. Example: ` " + # audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user: + # jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables ' + # DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from + # DATA_READ logging. + class AuditLogConfig + include Google::Apis::Core::Hashable + + # Specifies the identities that do not cause logging for this type of permission. + # Follows the same format of Binding.members. + # Corresponds to the JSON property `exemptedMembers` + # @return [Array] + attr_accessor :exempted_members + + # The log type that this config enables. + # Corresponds to the JSON property `logType` + # @return [String] + attr_accessor :log_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @exempted_members = args[:exempted_members] if args.key?(:exempted_members) + @log_type = args[:log_type] if args.key?(:log_type) + end + end + + # Message describing AuthProvider object + class AuthProvider + include Google::Apis::Core::Hashable + + # Optional. List of scopes that are allowed to be requested for this + # auth_provider. If this list is non-empty, only scopes within this list may be + # requested. If this list is empty, all scopes may be requested. Scopes + # appearing in `blocked_scopes` are disallowed even if they appear in ` + # allowed_scopes`. The number of allowed scopes is limited to 200. + # Corresponds to the JSON property `allowedScopes` + # @return [Array] + attr_accessor :allowed_scopes + + # AuthProvider type specific parameters. Required when creating an auth_provider. + # Corresponds to the JSON property `authProviderTypeParams` + # @return [Google::Apis::AgentidentityV1::AuthProviderTypeParams] + attr_accessor :auth_provider_type_params + + # Optional. List of scopes that are blocked from being requested for this + # auth_provider. If a scope appears in this list, it will not be requested, even + # if it also appears in `allowed_scopes`. `blocked_scopes` takes precedence over + # `allowed_scopes`. The number of blocked scopes is limited to 200. + # Corresponds to the JSON property `blockedScopes` + # @return [Array] + attr_accessor :blocked_scopes + + # Output only. [Output only] Create time stamp + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Output only. This is set to true if the auth_provider is deleted. + # Corresponds to the JSON property `deleted` + # @return [Boolean] + attr_accessor :deleted + alias_method :deleted?, :deleted + + # Optional. Description of the resource. Must be less than 256 characters. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Output only. The time when the auth_provider will expire. + # Corresponds to the JSON property `expireTime` + # @return [String] + attr_accessor :expire_time + + # Optional. Labels as key value pairs + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Identifier. The full resource name of the auth_provider. Format: projects/` + # project`/locations/`location`/authProviders/`auth_provider` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Output only. The state of the auth_provider. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Output only. [Output only] Update time stamp + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + # Optional. Input only. Represents the workload identity in IAM `principal://` + # format of the agent(s) that will use this AuthProvider. Example: `principal:// + # agents.global.org-$`ORG_ID`.system.id.goog/resources/aiplatform/projects/` + # PROJECT_ID`/locations/`LOCATIONS`/reasoningEngines/`ID`` + # Corresponds to the JSON property `workloadIds` + # @return [Array] + attr_accessor :workload_ids + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @allowed_scopes = args[:allowed_scopes] if args.key?(:allowed_scopes) + @auth_provider_type_params = args[:auth_provider_type_params] if args.key?(:auth_provider_type_params) + @blocked_scopes = args[:blocked_scopes] if args.key?(:blocked_scopes) + @create_time = args[:create_time] if args.key?(:create_time) + @deleted = args[:deleted] if args.key?(:deleted) + @description = args[:description] if args.key?(:description) + @expire_time = args[:expire_time] if args.key?(:expire_time) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @state = args[:state] if args.key?(:state) + @update_time = args[:update_time] if args.key?(:update_time) + @workload_ids = args[:workload_ids] if args.key?(:workload_ids) + end + end + + # AuthProvider type specific parameters. Required when creating an auth_provider. + class AuthProviderTypeParams + include Google::Apis::Core::Hashable + + # Message describing ApiKeyParams object. + # Corresponds to the JSON property `apiKey` + # @return [Google::Apis::AgentidentityV1::ApiKeyParams] + attr_accessor :api_key + + # Message describing GeminiEnterpriseAuthProviderParams object. + # Corresponds to the JSON property `geAuthProvider` + # @return [Google::Apis::AgentidentityV1::GeminiEnterpriseAuthProviderParams] + attr_accessor :ge_auth_provider + + # Message describing ThreeLeggedOAuth object. + # Corresponds to the JSON property `threeLeggedOauth` + # @return [Google::Apis::AgentidentityV1::ThreeLeggedOAuth] + attr_accessor :three_legged_oauth + + # Message describing TwoLeggedOAuth object. + # Corresponds to the JSON property `twoLeggedOauth` + # @return [Google::Apis::AgentidentityV1::TwoLeggedOAuth] + attr_accessor :two_legged_oauth + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @api_key = args[:api_key] if args.key?(:api_key) + @ge_auth_provider = args[:ge_auth_provider] if args.key?(:ge_auth_provider) + @three_legged_oauth = args[:three_legged_oauth] if args.key?(:three_legged_oauth) + @two_legged_oauth = args[:two_legged_oauth] if args.key?(:two_legged_oauth) + end + end + + # Message describing Authorization object + class Authorization + include Google::Apis::Core::Hashable + + # Output only. The client_user_id provided by the client application for their + # end user. Not verified by Google. + # Corresponds to the JSON property `clientUserId` + # @return [String] + attr_accessor :client_user_id + + # Output only. [Output only] Create time stamp + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Identifier. name of resource + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Output only. The scopes actually granted by the end user during the consent + # flow. + # Corresponds to the JSON property `scopes` + # @return [Array] + attr_accessor :scopes + + # Output only. The state of the authorization. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Output only. [Output only] Update time stamp + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @client_user_id = args[:client_user_id] if args.key?(:client_user_id) + @create_time = args[:create_time] if args.key?(:create_time) + @name = args[:name] if args.key?(:name) + @scopes = args[:scopes] if args.key?(:scopes) + @state = args[:state] if args.key?(:state) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # Associates `members`, or principals, with a `role`. + class Binding + 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 `condition` + # @return [Google::Apis::AgentidentityV1::Expr] + attr_accessor :condition + + # Specifies the principals requesting access for a Google Cloud resource. ` + # members` can have the following values: * `allUsers`: A special identifier + # that represents anyone who is on the internet; with or without a Google + # account. * `allAuthenticatedUsers`: A special identifier that represents + # anyone who is authenticated with a Google account or a service account. Does + # not include identities that come from external identity providers (IdPs) + # through identity federation. * `user:`emailid``: An email address that + # represents a specific Google account. For example, `alice@example.com` . * ` + # serviceAccount:`emailid``: An email address that represents a Google service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. * ` + # serviceAccount:`projectid`.svc.id.goog[`namespace`/`kubernetes-sa`]`: An + # identifier for a [Kubernetes service account](https://cloud.google.com/ + # kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my- + # project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:`emailid``: An + # email address that represents a Google group. For example, `admins@example.com` + # . * `domain:`domain``: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. * `principal: + # //iam.googleapis.com/locations/global/workforcePools/`pool_id`/subject/` + # subject_attribute_value``: A single identity in a workforce identity pool. * ` + # principalSet://iam.googleapis.com/locations/global/workforcePools/`pool_id`/ + # group/`group_id``: All workforce identities in a group. * `principalSet://iam. + # googleapis.com/locations/global/workforcePools/`pool_id`/attribute.` + # attribute_name`/`attribute_value``: All workforce identities with a specific + # attribute value. * `principalSet://iam.googleapis.com/locations/global/ + # workforcePools/`pool_id`/*`: All identities in a workforce identity pool. * ` + # principal://iam.googleapis.com/projects/`project_number`/locations/global/ + # workloadIdentityPools/`pool_id`/subject/`subject_attribute_value``: A single + # identity in a workload identity pool. * `principalSet://iam.googleapis.com/ + # projects/`project_number`/locations/global/workloadIdentityPools/`pool_id`/ + # group/`group_id``: A workload identity pool group. * `principalSet://iam. + # googleapis.com/projects/`project_number`/locations/global/ + # workloadIdentityPools/`pool_id`/attribute.`attribute_name`/`attribute_value``: + # All identities in a workload identity pool with a certain attribute. * ` + # principalSet://iam.googleapis.com/projects/`project_number`/locations/global/ + # workloadIdentityPools/`pool_id`/*`: All identities in a workload identity pool. + # * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique + # identifier) representing a user that has been recently deleted. For example, ` + # alice@example.com?uid=123456789012345678901`. If the user is recovered, this + # value reverts to `user:`emailid`` and the recovered user retains the role in + # the binding. * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email + # address (plus unique identifier) representing a service account that has been + # recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid= + # 123456789012345678901`. If the service account is undeleted, this value + # reverts to `serviceAccount:`emailid`` and the undeleted service account + # retains the role in the binding. * `deleted:group:`emailid`?uid=`uniqueid``: + # An email address (plus unique identifier) representing a Google group that has + # been recently deleted. For example, `admins@example.com?uid= + # 123456789012345678901`. If the group is recovered, this value reverts to ` + # group:`emailid`` and the recovered group retains the role in the binding. * ` + # deleted:principal://iam.googleapis.com/locations/global/workforcePools/` + # pool_id`/subject/`subject_attribute_value``: Deleted single identity in a + # workforce identity pool. For example, `deleted:principal://iam.googleapis.com/ + # locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`. + # Corresponds to the JSON property `members` + # @return [Array] + attr_accessor :members + + # Role that is assigned to the list of `members`, or principals. For example, ` + # roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM + # roles and permissions, see the [IAM documentation](https://cloud.google.com/ + # iam/docs/roles-overview). For a list of the available pre-defined roles, see [ + # here](https://cloud.google.com/iam/docs/understanding-roles). + # Corresponds to the JSON property `role` + # @return [String] + attr_accessor :role + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @condition = args[:condition] if args.key?(:condition) + @members = args[:members] if args.key?(:members) + @role = args[:role] if args.key?(:role) + end + end + + # Message for disabling an AuthProvider + class DisableAuthProviderRequest + include Google::Apis::Core::Hashable + + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. The request ID must be a + # valid UUID with the exception that zero UUID is not supported (00000000-0000- + # 0000-0000-000000000000). + # Corresponds to the JSON property `requestId` + # @return [String] + attr_accessor :request_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @request_id = args[:request_id] if args.key?(:request_id) + 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); ` + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Message for enabling an AuthProvider + class EnableAuthProviderRequest + include Google::Apis::Core::Hashable + + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. The request ID must be a + # valid UUID with the exception that zero UUID is not supported (00000000-0000- + # 0000-0000-000000000000). + # Corresponds to the JSON property `requestId` + # @return [String] + attr_accessor :request_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @request_id = args[:request_id] if args.key?(:request_id) + 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 + + # Message describing GeminiEnterpriseAuthProviderParams object. + class GeminiEnterpriseAuthProviderParams + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Message for response to listing AccessSummaries + class ListAccessSummariesResponse + include Google::Apis::Core::Hashable + + # The list of AccessSummary + # Corresponds to the JSON property `accessSummaries` + # @return [Array] + attr_accessor :access_summaries + + # A token identifying a page of results the server should return. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Unordered list. Locations that could not be reached. + # Corresponds to the JSON property `unreachable` + # @return [Array] + attr_accessor :unreachable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @access_summaries = args[:access_summaries] if args.key?(:access_summaries) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @unreachable = args[:unreachable] if args.key?(:unreachable) + end + end + + # Message for response to listing AuthProviders + class ListAuthProvidersResponse + include Google::Apis::Core::Hashable + + # The list of AuthProvider + # Corresponds to the JSON property `authProviders` + # @return [Array] + attr_accessor :auth_providers + + # A token identifying a page of results the server should return. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Unordered list. Locations that could not be reached. + # Corresponds to the JSON property `unreachable` + # @return [Array] + attr_accessor :unreachable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @auth_providers = args[:auth_providers] if args.key?(:auth_providers) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @unreachable = args[:unreachable] if args.key?(:unreachable) + end + end + + # Message for response to listing Authorizations + class ListAuthorizationsResponse + include Google::Apis::Core::Hashable + + # The list of Authorization + # Corresponds to the JSON property `authorizations` + # @return [Array] + attr_accessor :authorizations + + # A token identifying a page of results the server should return. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Unordered list. Locations that could not be reached. + # Corresponds to the JSON property `unreachable` + # @return [Array] + attr_accessor :unreachable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @authorizations = args[:authorizations] if args.key?(:authorizations) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @unreachable = args[:unreachable] if args.key?(:unreachable) + end + end + + # The response message for Locations.ListLocations. + class ListLocationsResponse + include Google::Apis::Core::Hashable + + # A list of locations that matches the specified filter in the request. + # Corresponds to the JSON property `locations` + # @return [Array] + attr_accessor :locations + + # The standard List next-page token. + # 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) + @locations = args[:locations] if args.key?(:locations) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # A resource that represents a Google Cloud location. + class Location + include Google::Apis::Core::Hashable + + # The friendly name for this location, typically a nearby city name. For example, + # "Tokyo". + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Cross-service attributes for the location. For example `"cloud.googleapis.com/ + # region": "us-east1"` + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The canonical id for this location. For example: `"us-east1"`. + # Corresponds to the JSON property `locationId` + # @return [String] + attr_accessor :location_id + + # Service-specific metadata. For example the available capacity at the given + # location. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # Resource name for the location, which may vary between implementations. For + # example: `"projects/example-project/locations/us-east1"` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @labels = args[:labels] if args.key?(:labels) + @location_id = args[:location_id] if args.key?(:location_id) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + end + end + + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. A `Policy` is a collection of `bindings`. + # A `binding` binds one or more `members`, or principals, to a single `role`. + # Principals can be user accounts, service accounts, Google groups, and domains ( + # such as G Suite). A `role` is a named list of permissions; each `role` can be + # an IAM predefined role or a user-created custom role. For some types of Google + # Cloud resources, a `binding` can also specify a `condition`, which is a + # logical expression that allows access to a resource only if the expression + # evaluates to `true`. A condition can add constraints based on attributes of + # the request, the resource, or both. To learn which resources support + # conditions in their IAM policies, see the [IAM documentation](https://cloud. + # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` " + # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [ + # "user:mike@example.com", "group:admins@example.com", "domain:google.com", " + # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": " + # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" + # ], "condition": ` "title": "expirable access", "description": "Does not grant + # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00: + # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML + # example:** ``` bindings: - members: - user:mike@example.com - group:admins@ + # example.com - domain:google.com - serviceAccount:my-project-id@appspot. + # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - + # user:eve@example.com role: roles/resourcemanager.organizationViewer condition: + # title: expirable access description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: + # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + class Policy + include Google::Apis::Core::Hashable + + # Specifies cloud audit logging configuration for this policy. + # Corresponds to the JSON property `auditConfigs` + # @return [Array] + attr_accessor :audit_configs + + # Associates a list of `members`, or principals, with a `role`. Optionally, may + # specify a `condition` that determines how and when the `bindings` are applied. + # Each of the `bindings` must contain at least one principal. The `bindings` in + # a `Policy` can refer to up to 1,500 principals; up to 250 of these principals + # can be Google groups. Each occurrence of a principal counts towards these + # limits. For example, if the `bindings` grant 50 different roles to `user:alice@ + # example.com`, and not to any other principal, then you can add another 1,450 + # principals to the `bindings` in the `Policy`. + # Corresponds to the JSON property `bindings` + # @return [Array] + attr_accessor :bindings + + # `etag` is used for optimistic concurrency control as a way to help prevent + # simultaneous updates of a policy from overwriting each other. It is strongly + # suggested that systems make use of the `etag` in the read-modify-write cycle + # to perform policy updates in order to avoid race conditions: An `etag` is + # returned in the response to `getIamPolicy`, and systems are expected to put + # that etag in the request to `setIamPolicy` to ensure that their change will be + # applied to the same version of the policy. **Important:** If you use IAM + # Conditions, you must include the `etag` field whenever you call `setIamPolicy`. + # If you omit this field, then IAM allows you to overwrite a version `3` policy + # with a version `1` policy, and all of the conditions in the version `3` policy + # are lost. + # Corresponds to the JSON property `etag` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :etag + + # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. + # Requests that specify an invalid value are rejected. Any operation that + # affects conditional role bindings must specify version `3`. This requirement + # applies to the following operations: * Getting a policy that includes a + # conditional role binding * Adding a conditional role binding to a policy * + # Changing a conditional role binding in a policy * Removing any role binding, + # with or without a condition, from a policy that includes conditions ** + # Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you + # to overwrite a version `3` policy with a version `1` policy, and all of the + # conditions in the version `3` policy are lost. If a policy does not include + # any conditions, operations on that policy may specify any valid version or + # leave the field unset. To learn which resources support conditions in their + # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/ + # conditions/resource-policies). + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @audit_configs = args[:audit_configs] if args.key?(:audit_configs) + @bindings = args[:bindings] if args.key?(:bindings) + @etag = args[:etag] if args.key?(:etag) + @version = args[:version] if args.key?(:version) + end + end + + # Response message for QueryAuthProviders. + class QueryAuthProvidersResponse + include Google::Apis::Core::Hashable + + # The unique list of auth_provider resource names used by the workload. + # Corresponds to the JSON property `authProviderNames` + # @return [Array] + attr_accessor :auth_provider_names + + # A token identifying a page of results the server should return. If this field + # is omitted, there are no subsequent pages. + # 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) + @auth_provider_names = args[:auth_provider_names] if args.key?(:auth_provider_names) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Response message for QueryWorkloads. + class QueryWorkloadsResponse + include Google::Apis::Core::Hashable + + # A token to retrieve the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The unique list of workload identifiers (agents) that used the auth_provider. + # Corresponds to the JSON property `workloadIds` + # @return [Array] + attr_accessor :workload_ids + + 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) + @workload_ids = args[:workload_ids] if args.key?(:workload_ids) + end + end + + # Request message for RevokeAuthorization. + class RevokeAuthorizationRequest + include Google::Apis::Core::Hashable + + # Required. The identity of the user to revoke authorization for. + # Corresponds to the JSON property `userId` + # @return [String] + attr_accessor :user_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @user_id = args[:user_id] if args.key?(:user_id) + end + end + + # Response message for RevokeAuthorization. + class RevokeAuthorizationResponse + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Request message for `SetIamPolicy` method. + class SetIamPolicyRequest + include Google::Apis::Core::Hashable + + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. A `Policy` is a collection of `bindings`. + # A `binding` binds one or more `members`, or principals, to a single `role`. + # Principals can be user accounts, service accounts, Google groups, and domains ( + # such as G Suite). A `role` is a named list of permissions; each `role` can be + # an IAM predefined role or a user-created custom role. For some types of Google + # Cloud resources, a `binding` can also specify a `condition`, which is a + # logical expression that allows access to a resource only if the expression + # evaluates to `true`. A condition can add constraints based on attributes of + # the request, the resource, or both. To learn which resources support + # conditions in their IAM policies, see the [IAM documentation](https://cloud. + # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` " + # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [ + # "user:mike@example.com", "group:admins@example.com", "domain:google.com", " + # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": " + # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" + # ], "condition": ` "title": "expirable access", "description": "Does not grant + # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00: + # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML + # example:** ``` bindings: - members: - user:mike@example.com - group:admins@ + # example.com - domain:google.com - serviceAccount:my-project-id@appspot. + # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - + # user:eve@example.com role: roles/resourcemanager.organizationViewer condition: + # title: expirable access description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: + # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # Corresponds to the JSON property `policy` + # @return [Google::Apis::AgentidentityV1::Policy] + attr_accessor :policy + + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the following + # default mask is used: `paths: "bindings, etag"` + # Corresponds to the JSON property `updateMask` + # @return [String] + attr_accessor :update_mask + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @policy = args[:policy] if args.key?(:policy) + @update_mask = args[:update_mask] if args.key?(:update_mask) + end + end + + # Request message for `TestIamPermissions` method. + class TestIamPermissionsRequest + include Google::Apis::Core::Hashable + + # The set of permissions to check for the `resource`. Permissions with wildcards + # (such as `*` or `storage.*`) are not allowed. For more information see [IAM + # Overview](https://cloud.google.com/iam/docs/overview#permissions). + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # Response message for `TestIamPermissions` method. + class TestIamPermissionsResponse + include Google::Apis::Core::Hashable + + # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # Message describing ThreeLeggedOAuth object. + class ThreeLeggedOAuth + include Google::Apis::Core::Hashable + + # Optional. The authorization endpoint to send users to for consenting to + # delegate to the agent. eg. "https://auth.atlassian.com/authorize" + # Corresponds to the JSON property `authorizationUrl` + # @return [String] + attr_accessor :authorization_url + + # Optional. The client ID of the OAuth client. + # Corresponds to the JSON property `clientId` + # @return [String] + attr_accessor :client_id + + # Optional. Input only. The client secret of the OAuth client. + # Corresponds to the JSON property `clientSecret` + # @return [String] + attr_accessor :client_secret + + # Optional. The default continue URI for 3LO flow and it will be used when no + # continue URI is provided in the RetrieveCredentials request. + # Corresponds to the JSON property `defaultContinueUri` + # @return [String] + attr_accessor :default_continue_uri + + # Optional. Enables Proof Key for Code Exchange (PKCE) for the OAuth flow to + # prevent authorization code interception attacks. + # Corresponds to the JSON property `enablePkce` + # @return [Boolean] + attr_accessor :enable_pkce + alias_method :enable_pkce?, :enable_pkce + + # Output only. The redirect URL this auth_provider uses for the OAuth exchange. + # This is deterministic based on the name of the auth_provider. + # Corresponds to the JSON property `redirectUrl` + # @return [String] + attr_accessor :redirect_url + + # Optional. The token endpoint for requesting tokens on behalf of an end user. + # eg. "https://auth.atlassian.com/oauth/token" + # Corresponds to the JSON property `tokenUrl` + # @return [String] + attr_accessor :token_url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @authorization_url = args[:authorization_url] if args.key?(:authorization_url) + @client_id = args[:client_id] if args.key?(:client_id) + @client_secret = args[:client_secret] if args.key?(:client_secret) + @default_continue_uri = args[:default_continue_uri] if args.key?(:default_continue_uri) + @enable_pkce = args[:enable_pkce] if args.key?(:enable_pkce) + @redirect_url = args[:redirect_url] if args.key?(:redirect_url) + @token_url = args[:token_url] if args.key?(:token_url) + end + end + + # Message describing TwoLeggedOAuth object. + class TwoLeggedOAuth + include Google::Apis::Core::Hashable + + # Optional. The client ID of the OAuth client. + # Corresponds to the JSON property `clientId` + # @return [String] + attr_accessor :client_id + + # Optional. Input only. The client secret of the OAuth client. + # Corresponds to the JSON property `clientSecret` + # @return [String] + attr_accessor :client_secret + + # Optional. The token endpoint of the OAuth client. + # Corresponds to the JSON property `tokenUrl` + # @return [String] + attr_accessor :token_url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @client_id = args[:client_id] if args.key?(:client_id) + @client_secret = args[:client_secret] if args.key?(:client_secret) + @token_url = args[:token_url] if args.key?(:token_url) + end + end + + # Message for undeleting a AuthProvider + class UndeleteAuthProviderRequest + include Google::Apis::Core::Hashable + + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. The request ID must be a + # valid UUID with the exception that zero UUID is not supported (00000000-0000- + # 0000-0000-000000000000). + # Corresponds to the JSON property `requestId` + # @return [String] + attr_accessor :request_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @request_id = args[:request_id] if args.key?(:request_id) + end + end + end + end +end diff --git a/generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1/gem_version.rb b/generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1/gem_version.rb new file mode 100644 index 00000000000..3e9bd7cf7ae --- /dev/null +++ b/generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1/gem_version.rb @@ -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 AgentidentityV1 + # Version of the google-apis-agentidentity_v1 gem + GEM_VERSION = "0.1.0" + + # Version of the code generator used to generate this client + GENERATOR_VERSION = "0.19.0" + + # Revision of the discovery document this client was generated from + REVISION = "20260722" + end + end +end diff --git a/generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1/representations.rb b/generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1/representations.rb new file mode 100644 index 00000000000..75321a13eda --- /dev/null +++ b/generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1/representations.rb @@ -0,0 +1,475 @@ +# 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 AgentidentityV1 + + class AccessSummary + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ApiKeyParams + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AuditConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AuditLogConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AuthProvider + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AuthProviderTypeParams + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Authorization + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Binding + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DisableAuthProviderRequest + 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 EnableAuthProviderRequest + 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 GeminiEnterpriseAuthProviderParams + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListAccessSummariesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListAuthProvidersResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListAuthorizationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListLocationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Location + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Policy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class QueryAuthProvidersResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class QueryWorkloadsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RevokeAuthorizationRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RevokeAuthorizationResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ThreeLeggedOAuth + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TwoLeggedOAuth + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UndeleteAuthProviderRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AccessSummary + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :auth_provider, as: 'authProvider' + property :auth_provider_type, as: 'authProviderType' + property :first_access_time, as: 'firstAccessTime' + hash :labels, as: 'labels' + property :last_access_time, as: 'lastAccessTime' + property :name, as: 'name' + property :purge_time, as: 'purgeTime' + collection :scopes, as: 'scopes' + property :token_url, as: 'tokenUrl' + property :user_id, as: 'userId' + property :workload_id, as: 'workloadId' + end + end + + class ApiKeyParams + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :api_key, as: 'apiKey' + end + end + + class AuditConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::AgentidentityV1::AuditLogConfig, decorator: Google::Apis::AgentidentityV1::AuditLogConfig::Representation + + property :service, as: 'service' + end + end + + class AuditLogConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :exempted_members, as: 'exemptedMembers' + property :log_type, as: 'logType' + end + end + + class AuthProvider + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :allowed_scopes, as: 'allowedScopes' + property :auth_provider_type_params, as: 'authProviderTypeParams', class: Google::Apis::AgentidentityV1::AuthProviderTypeParams, decorator: Google::Apis::AgentidentityV1::AuthProviderTypeParams::Representation + + collection :blocked_scopes, as: 'blockedScopes' + property :create_time, as: 'createTime' + property :deleted, as: 'deleted' + property :description, as: 'description' + property :expire_time, as: 'expireTime' + hash :labels, as: 'labels' + property :name, as: 'name' + property :state, as: 'state' + property :update_time, as: 'updateTime' + collection :workload_ids, as: 'workloadIds' + end + end + + class AuthProviderTypeParams + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :api_key, as: 'apiKey', class: Google::Apis::AgentidentityV1::ApiKeyParams, decorator: Google::Apis::AgentidentityV1::ApiKeyParams::Representation + + property :ge_auth_provider, as: 'geAuthProvider', class: Google::Apis::AgentidentityV1::GeminiEnterpriseAuthProviderParams, decorator: Google::Apis::AgentidentityV1::GeminiEnterpriseAuthProviderParams::Representation + + property :three_legged_oauth, as: 'threeLeggedOauth', class: Google::Apis::AgentidentityV1::ThreeLeggedOAuth, decorator: Google::Apis::AgentidentityV1::ThreeLeggedOAuth::Representation + + property :two_legged_oauth, as: 'twoLeggedOauth', class: Google::Apis::AgentidentityV1::TwoLeggedOAuth, decorator: Google::Apis::AgentidentityV1::TwoLeggedOAuth::Representation + + end + end + + class Authorization + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :client_user_id, as: 'clientUserId' + property :create_time, as: 'createTime' + property :name, as: 'name' + collection :scopes, as: 'scopes' + property :state, as: 'state' + property :update_time, as: 'updateTime' + end + end + + class Binding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :condition, as: 'condition', class: Google::Apis::AgentidentityV1::Expr, decorator: Google::Apis::AgentidentityV1::Expr::Representation + + collection :members, as: 'members' + property :role, as: 'role' + end + end + + class DisableAuthProviderRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :request_id, as: 'requestId' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class EnableAuthProviderRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :request_id, as: 'requestId' + 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 GeminiEnterpriseAuthProviderParams + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class ListAccessSummariesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :access_summaries, as: 'accessSummaries', class: Google::Apis::AgentidentityV1::AccessSummary, decorator: Google::Apis::AgentidentityV1::AccessSummary::Representation + + property :next_page_token, as: 'nextPageToken' + collection :unreachable, as: 'unreachable' + end + end + + class ListAuthProvidersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :auth_providers, as: 'authProviders', class: Google::Apis::AgentidentityV1::AuthProvider, decorator: Google::Apis::AgentidentityV1::AuthProvider::Representation + + property :next_page_token, as: 'nextPageToken' + collection :unreachable, as: 'unreachable' + end + end + + class ListAuthorizationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :authorizations, as: 'authorizations', class: Google::Apis::AgentidentityV1::Authorization, decorator: Google::Apis::AgentidentityV1::Authorization::Representation + + property :next_page_token, as: 'nextPageToken' + collection :unreachable, as: 'unreachable' + end + end + + class ListLocationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :locations, as: 'locations', class: Google::Apis::AgentidentityV1::Location, decorator: Google::Apis::AgentidentityV1::Location::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class Location + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + hash :labels, as: 'labels' + property :location_id, as: 'locationId' + hash :metadata, as: 'metadata' + property :name, as: 'name' + end + end + + class Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :audit_configs, as: 'auditConfigs', class: Google::Apis::AgentidentityV1::AuditConfig, decorator: Google::Apis::AgentidentityV1::AuditConfig::Representation + + collection :bindings, as: 'bindings', class: Google::Apis::AgentidentityV1::Binding, decorator: Google::Apis::AgentidentityV1::Binding::Representation + + property :etag, :base64 => true, as: 'etag' + property :version, as: 'version' + end + end + + class QueryAuthProvidersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :auth_provider_names, as: 'authProviderNames' + property :next_page_token, as: 'nextPageToken' + end + end + + class QueryWorkloadsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :workload_ids, as: 'workloadIds' + end + end + + class RevokeAuthorizationRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :user_id, as: 'userId' + end + end + + class RevokeAuthorizationResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class SetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy, as: 'policy', class: Google::Apis::AgentidentityV1::Policy, decorator: Google::Apis::AgentidentityV1::Policy::Representation + + property :update_mask, as: 'updateMask' + end + end + + class TestIamPermissionsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class TestIamPermissionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class ThreeLeggedOAuth + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :authorization_url, as: 'authorizationUrl' + property :client_id, as: 'clientId' + property :client_secret, as: 'clientSecret' + property :default_continue_uri, as: 'defaultContinueUri' + property :enable_pkce, as: 'enablePkce' + property :redirect_url, as: 'redirectUrl' + property :token_url, as: 'tokenUrl' + end + end + + class TwoLeggedOAuth + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :client_id, as: 'clientId' + property :client_secret, as: 'clientSecret' + property :token_url, as: 'tokenUrl' + end + end + + class UndeleteAuthProviderRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :request_id, as: 'requestId' + end + end + end + end +end diff --git a/generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1/service.rb b/generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1/service.rb new file mode 100644 index 00000000000..c974fc80f80 --- /dev/null +++ b/generated/google-apis-agentidentity_v1/lib/google/apis/agentidentity_v1/service.rb @@ -0,0 +1,927 @@ +# 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 AgentidentityV1 + # Agent Identity API + # + # + # + # @example + # require 'google/apis/agentidentity_v1' + # + # Agentidentity = Google::Apis::AgentidentityV1 # Alias the module + # service = Agentidentity::AgentIdentityService.new + # + # @see https://cloud.google.com/iam/docs/ + class AgentIdentityService < Google::Apis::Core::BaseService + DEFAULT_ENDPOINT_TEMPLATE = "https://agentidentity.$UNIVERSE_DOMAIN$/" + + # @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(DEFAULT_ENDPOINT_TEMPLATE, '', + client_name: 'google-apis-agentidentity_v1', + client_version: Google::Apis::AgentidentityV1::GEM_VERSION) + @batch_path = 'batch' + end + + # Gets information about a location. + # @param [String] name + # Resource name for the location. + # @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::AgentidentityV1::Location] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::Location] + # + # @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_location(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::AgentidentityV1::Location::Representation + command.response_class = Google::Apis::AgentidentityV1::Location + 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 information about the supported locations for this service. This method + # lists locations based on the resource scope provided in the + # ListLocationsRequest.name field: * **Global locations**: If `name` is empty, + # the method lists the public locations available to all projects. * **Project- + # specific locations**: If `name` follows the format `projects/`project``, the + # method lists locations visible to that specific project. This includes public, + # private, or other project-specific locations enabled for the project. For gRPC + # and client library implementations, the resource name is passed as the `name` + # field. For direct service calls, the resource name is incorporated into the + # request path based on the specific service implementation and version. + # @param [String] name + # The resource that owns the locations collection, if applicable. + # @param [Array, String] extra_location_types + # Optional. Do not use this field unless explicitly documented otherwise. This + # is primarily for internal usage. + # @param [String] filter + # A filter to narrow down results to a preferred subset. The filtering language + # accepts strings like `"displayName=tokyo"`, and is documented in more detail + # in [AIP-160](https://google.aip.dev/160). + # @param [Fixnum] page_size + # The maximum number of results to return. If not set, the service selects a + # default. + # @param [String] page_token + # A page token received from the `next_page_token` field in the response. Send + # that page token to receive the subsequent page. + # @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::AgentidentityV1::ListLocationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::ListLocationsResponse] + # + # @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_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}/locations', options) + command.response_representation = Google::Apis::AgentidentityV1::ListLocationsResponse::Representation + command.response_class = Google::Apis::AgentidentityV1::ListLocationsResponse + command.params['name'] = name unless name.nil? + command.query['extraLocationTypes'] = extra_location_types unless extra_location_types.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 + + # Gets details of a single AccessSummary. + # @param [String] name + # Required. Name of the 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::AgentidentityV1::AccessSummary] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::AccessSummary] + # + # @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_location_access_summary(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::AgentidentityV1::AccessSummary::Representation + command.response_class = Google::Apis::AgentidentityV1::AccessSummary + 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 AccessSummaries in a given project and location. Supported Filters: - ` + # workload_id`: Filter by the SPIFFE ID of the agent. Example: `workload_id=" + # spiffe://example.com/ns/default/sa/my-agent"` + # @param [String] parent + # Required. The parent resource where the search is performed. Format: projects/` + # project`/locations/`location` + # @param [String] filter + # Optional. Filter string to restrict the results. Currently supports filtering + # by `workload_id` or `auth_provider_name`. If no filter is provided, returns + # all access summaries for the requested project and location. Format: ` + # workload_id=""` or `auth_provider_name=""` + # @param [String] order_by + # Optional. This field is currently ignored. Defaults to ordering by ( + # auth_provider_id, user_id) in ascending order. + # @param [Fixnum] page_size + # Optional. Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param [String] page_token + # Optional. A token identifying a page of results the server should 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::AgentidentityV1::ListAccessSummariesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::ListAccessSummariesResponse] + # + # @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_location_access_summaries(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/accessSummaries', options) + command.response_representation = Google::Apis::AgentidentityV1::ListAccessSummariesResponse::Representation + command.response_class = Google::Apis::AgentidentityV1::ListAccessSummariesResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['orderBy'] = order_by unless order_by.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 + + # Creates a new AuthProvider in a given project and location. + # @param [String] parent + # Required. The parent resource where the AuthProvider is created. Format: + # projects/`project`/locations/`location` + # @param [Google::Apis::AgentidentityV1::AuthProvider] auth_provider_object + # @param [String] auth_provider_id + # Required. The ID to use for the AuthProvider, which will become the final + # segment of the AuthProvider's resource name. This value should be 1-63 + # characters, and valid characters are /a-z-/. The first character must be a + # lowercase letter, and the last character must be a lowercase letter or a + # number. + # @param [String] request_id + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will guarantee + # that for at least 60 minutes since the first request. For example, consider a + # situation where you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # original operation with the same request ID was received, and if so, will + # ignore the second request. This prevents clients from accidentally creating + # duplicate commitments. The request ID must be a valid UUID with the exception + # that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + # @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::AgentidentityV1::AuthProvider] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::AuthProvider] + # + # @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_project_location_auth_provider(parent, auth_provider_object = nil, auth_provider_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/authProviders', options) + command.request_representation = Google::Apis::AgentidentityV1::AuthProvider::Representation + command.request_object = auth_provider_object + command.response_representation = Google::Apis::AgentidentityV1::AuthProvider::Representation + command.response_class = Google::Apis::AgentidentityV1::AuthProvider + command.params['parent'] = parent unless parent.nil? + command.query['authProviderId'] = auth_provider_id unless auth_provider_id.nil? + command.query['requestId'] = request_id unless request_id.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 a single AuthProvider. + # @param [String] name + # Required. Name of the resource + # @param [String] request_id + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. For example, consider a + # situation where you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # original operation with the same request ID was received, and if so, will + # ignore the second request. This prevents clients from accidentally creating + # duplicate commitments. The request ID must be a valid UUID with the exception + # that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + # @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::AgentidentityV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::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_location_auth_provider(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::AgentidentityV1::Empty::Representation + command.response_class = Google::Apis::AgentidentityV1::Empty + command.params['name'] = name unless name.nil? + command.query['requestId'] = request_id unless request_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Disables a single AuthProvider. + # @param [String] name + # Required. Name of the resource Format: projects/`project`/locations/`location`/ + # authProviders/`auth_provider` + # @param [Google::Apis::AgentidentityV1::DisableAuthProviderRequest] disable_auth_provider_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::AgentidentityV1::AuthProvider] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::AuthProvider] + # + # @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 disable_auth_provider(name, disable_auth_provider_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:disable', options) + command.request_representation = Google::Apis::AgentidentityV1::DisableAuthProviderRequest::Representation + command.request_object = disable_auth_provider_request_object + command.response_representation = Google::Apis::AgentidentityV1::AuthProvider::Representation + command.response_class = Google::Apis::AgentidentityV1::AuthProvider + 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 + + # Enables a single AuthProvider. + # @param [String] name + # Required. Name of the resource Format: projects/`project`/locations/`location`/ + # authProviders/`auth_provider` + # @param [Google::Apis::AgentidentityV1::EnableAuthProviderRequest] enable_auth_provider_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::AgentidentityV1::AuthProvider] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::AuthProvider] + # + # @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 enable_auth_provider(name, enable_auth_provider_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:enable', options) + command.request_representation = Google::Apis::AgentidentityV1::EnableAuthProviderRequest::Representation + command.request_object = enable_auth_provider_request_object + command.response_representation = Google::Apis::AgentidentityV1::AuthProvider::Representation + command.response_class = Google::Apis::AgentidentityV1::AuthProvider + 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 details of a single AuthProvider. + # @param [String] name + # Required. Name of the 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::AgentidentityV1::AuthProvider] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::AuthProvider] + # + # @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_location_auth_provider(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::AgentidentityV1::AuthProvider::Representation + command.response_class = Google::Apis::AgentidentityV1::AuthProvider + 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 access control policy for a resource. Returns an empty policy if the + # resource exists and does not have a policy set. + # @param [String] resource + # REQUIRED: The resource for which the policy is being requested. See [Resource + # names](https://cloud.google.com/apis/design/resource_names) for the + # appropriate value for this field. + # @param [Fixnum] options_requested_policy_version + # Optional. The maximum policy version that will be used to format the policy. + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. Requests for policies with any conditional role bindings must + # specify version 3. Policies with no conditional role bindings may specify any + # valid value or leave the field unset. The policy in the response might use the + # policy version that you specified, or it might use a lower policy version. For + # example, if you specify version 3, but the policy has no conditional role + # bindings, the response uses version 1. To learn which resources support + # conditions in their IAM policies, see the [IAM documentation](https://cloud. + # google.com/iam/help/conditions/resource-policies). + # @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::AgentidentityV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::Policy] + # + # @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_location_auth_provider_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options) + command.response_representation = Google::Apis::AgentidentityV1::Policy::Representation + command.response_class = Google::Apis::AgentidentityV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.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 AuthProviders in a given project and location. + # @param [String] parent + # Required. The parent resource where the search is performed. Format: projects/` + # project`/locations/`location` + # @param [String] filter + # Optional. Filter results. This field is currently ignored. + # @param [String] order_by + # Optional. Currently ignored. Defaults to ordering by auth_provider_id in + # ascending order. + # @param [Fixnum] page_size + # Optional. Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param [String] page_token + # Optional. A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, the first page is returned. + # @param [Boolean] show_deleted + # Optional. Deleted auth_providers will be kept with a soft-delete for 30 days + # before being purged. If this field is set to true, deleted auth_providers will + # also be returned. + # @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::AgentidentityV1::ListAuthProvidersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::ListAuthProvidersResponse] + # + # @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_location_auth_providers(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/authProviders', options) + command.response_representation = Google::Apis::AgentidentityV1::ListAuthProvidersResponse::Representation + command.response_class = Google::Apis::AgentidentityV1::ListAuthProvidersResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['orderBy'] = order_by unless order_by.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['showDeleted'] = show_deleted unless show_deleted.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 parameters of a single AuthProvider. + # @param [String] name + # Identifier. The full resource name of the auth_provider. Format: projects/` + # project`/locations/`location`/authProviders/`auth_provider` + # @param [Google::Apis::AgentidentityV1::AuthProvider] auth_provider_object + # @param [String] request_id + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will guarantee + # that for at least 60 minutes since the first request. For example, consider a + # situation where you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # original operation with the same request ID was received, and if so, will + # ignore the second request. This prevents clients from accidentally creating + # duplicate commitments. The request ID must be a valid UUID with the exception + # that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + # @param [String] update_mask + # Optional. Field mask is used to specify the fields to be overwritten in the + # AuthProvider resource by the update. The fields specified in the update_mask + # are relative to the resource, not the full request. A field will be + # overwritten if it is in the mask. If the user does not provide a mask then all + # fields present in the request will be overwritten. + # @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::AgentidentityV1::AuthProvider] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::AuthProvider] + # + # @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_project_location_auth_provider(name, auth_provider_object = nil, request_id: 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::AgentidentityV1::AuthProvider::Representation + command.request_object = auth_provider_object + command.response_representation = Google::Apis::AgentidentityV1::AuthProvider::Representation + command.response_class = Google::Apis::AgentidentityV1::AuthProvider + command.params['name'] = name unless name.nil? + command.query['requestId'] = request_id unless request_id.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 + + # Queries what all auth_providers are used by a given workload_id. + # @param [String] parent + # Required. The parent resource where the search is performed. Format: projects/` + # project`/locations/`location` + # @param [Fixnum] page_size + # Optional. Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. The maximum page size + # is 1000. + # @param [String] page_token + # Optional. A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, the first page is returned. A page token, received + # from a previous QueryAuthProviders call. Provide this to retrieve the + # subsequent page. When paginating, all other parameters provided to + # QueryAuthProviders must match the call that provided the page token. + # @param [String] workload_id + # Required. The workload identifier to filter by. + # @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::AgentidentityV1::QueryAuthProvidersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::QueryAuthProvidersResponse] + # + # @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 query_project_location_auth_provider(parent, page_size: nil, page_token: nil, workload_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/authProviders:query', options) + command.response_representation = Google::Apis::AgentidentityV1::QueryAuthProvidersResponse::Representation + command.response_class = Google::Apis::AgentidentityV1::QueryAuthProvidersResponse + 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['workloadId'] = workload_id unless workload_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Queries what all workloads are using a given auth_provider. + # @param [String] name + # Required. The name of the auth_provider to query. Format: projects/`project`/ + # locations/`location`/authProviders/`auth_provider` + # @param [Fixnum] page_size + # Optional. Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param [String] page_token + # Optional. A token, which can be sent as `page_token` to retrieve the next page. + # When paginating, all other parameters provided to QueryWorkloads must match + # the call that provided the page token. If this field is omitted, the first + # page is returned. + # @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::AgentidentityV1::QueryWorkloadsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::QueryWorkloadsResponse] + # + # @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 query_project_location_auth_provider_workloads(name, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}:queryWorkloads', options) + command.response_representation = Google::Apis::AgentidentityV1::QueryWorkloadsResponse::Representation + command.response_class = Google::Apis::AgentidentityV1::QueryWorkloadsResponse + command.params['name'] = name unless name.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 + + # Revokes all authorizations for a specific user on an AuthProvider. This + # deletes all authorization records associated with the user and AuthProvider, + # effectively revoking access across all agents. + # @param [String] name + # Required. The resource name of the AuthProvider. Format: projects/`project`/ + # locations/`location`/authProviders/`auth_provider` + # @param [Google::Apis::AgentidentityV1::RevokeAuthorizationRequest] revoke_authorization_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::AgentidentityV1::RevokeAuthorizationResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::RevokeAuthorizationResponse] + # + # @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 revoke_auth_provider_authorization(name, revoke_authorization_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:revokeAuthorization', options) + command.request_representation = Google::Apis::AgentidentityV1::RevokeAuthorizationRequest::Representation + command.request_object = revoke_authorization_request_object + command.response_representation = Google::Apis::AgentidentityV1::RevokeAuthorizationResponse::Representation + command.response_class = Google::Apis::AgentidentityV1::RevokeAuthorizationResponse + 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 + + # Sets the access control policy on the specified resource. Replaces any + # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and ` + # PERMISSION_DENIED` errors. + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. See [Resource + # names](https://cloud.google.com/apis/design/resource_names) for the + # appropriate value for this field. + # @param [Google::Apis::AgentidentityV1::SetIamPolicyRequest] set_iam_policy_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::AgentidentityV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::Policy] + # + # @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 set_auth_provider_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::AgentidentityV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::AgentidentityV1::Policy::Representation + command.response_class = Google::Apis::AgentidentityV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified resource. If the + # resource does not exist, this will return an empty set of permissions, not a ` + # NOT_FOUND` error. Note: This operation is designed to be used for building + # permission-aware UIs and command-line tools, not for authorization checking. + # This operation may "fail open" without warning. + # @param [String] resource + # REQUIRED: The resource for which the policy detail is being requested. See [ + # Resource names](https://cloud.google.com/apis/design/resource_names) for the + # appropriate value for this field. + # @param [Google::Apis::AgentidentityV1::TestIamPermissionsRequest] test_iam_permissions_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::AgentidentityV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::TestIamPermissionsResponse] + # + # @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 test_auth_provider_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::AgentidentityV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::AgentidentityV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::AgentidentityV1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Undeletes a single AuthProvider. + # @param [String] name + # Required. Name of the resource Format: projects/`project`/locations/`location`/ + # authProviders/`auth_provider` + # @param [Google::Apis::AgentidentityV1::UndeleteAuthProviderRequest] undelete_auth_provider_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::AgentidentityV1::AuthProvider] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::AuthProvider] + # + # @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 undelete_auth_provider(name, undelete_auth_provider_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:undelete', options) + command.request_representation = Google::Apis::AgentidentityV1::UndeleteAuthProviderRequest::Representation + command.request_object = undelete_auth_provider_request_object + command.response_representation = Google::Apis::AgentidentityV1::AuthProvider::Representation + command.response_class = Google::Apis::AgentidentityV1::AuthProvider + 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 + + # Deletes a single Authorization. + # @param [String] name + # Required. The name of the Authorization to delete. Format: projects/`project`/ + # locations/`location`/authProviders/`auth_provider`/authorizations/` + # authorization` + # @param [String] request_id + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. For example, consider a + # situation where you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # original operation with the same request ID was received, and if so, will + # ignore the second request. This prevents clients from accidentally creating + # duplicate commitments. The request ID must be a valid UUID with the exception + # that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + # @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::AgentidentityV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::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_location_auth_provider_authorization(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::AgentidentityV1::Empty::Representation + command.response_class = Google::Apis::AgentidentityV1::Empty + command.params['name'] = name unless name.nil? + command.query['requestId'] = request_id unless request_id.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 details of a single Authorization. + # @param [String] name + # Required. Name of the 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::AgentidentityV1::Authorization] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::Authorization] + # + # @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_location_auth_provider_authorization(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::AgentidentityV1::Authorization::Representation + command.response_class = Google::Apis::AgentidentityV1::Authorization + 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 Authorizations in a given project and location. + # @param [String] parent + # Required. The parent resource where the search is performed. Format: projects/` + # project`/locations/`location`/authProviders/`auth_provider` + # @param [String] filter + # Optional. Filter string to restrict the results. Currently supports filtering + # by `client_user_id` only. Format: `client_user_id=""` + # @param [String] order_by + # Optional. This field is currently ignored. Defaults to ordering by + # authorization_id in ascending order. + # @param [Fixnum] page_size + # Optional. Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param [String] page_token + # Optional. A page token, received from a previous `ListAuthorizations` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListAuthorizations` must match the call that provided + # the page token. + # @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::AgentidentityV1::ListAuthorizationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AgentidentityV1::ListAuthorizationsResponse] + # + # @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_location_auth_provider_authorizations(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/authorizations', options) + command.response_representation = Google::Apis::AgentidentityV1::ListAuthorizationsResponse::Representation + command.response_class = Google::Apis::AgentidentityV1::ListAuthorizationsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['orderBy'] = order_by unless order_by.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 diff --git a/generated/google-apis-agentidentity_v1/spec/generated_spec.rb b/generated/google-apis-agentidentity_v1/spec/generated_spec.rb new file mode 100644 index 00000000000..c83e98a24f0 --- /dev/null +++ b/generated/google-apis-agentidentity_v1/spec/generated_spec.rb @@ -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::AgentidentityV1" do + # Minimal test just to ensure no syntax errors in generated code + it "should load" do + expect do + require "google/apis/agentidentity_v1" + end.not_to raise_error + expect do + Google::Apis::AgentidentityV1::AgentIdentityService.new + end.not_to raise_error + end +end